Sign in to follow this  
Followers 0
Insolence

Const's

5 posts in this topic

Dim Const $arCharacters[65][2]

Gives me

C:\Documents and Settings\Eric\Desktop\programming\autoit\iPFU\test\OCR\Character Definitions.au3 (1) : ==> Expected a "=" operator in assignment statement.: 
Dim Const $arCharacters[65][2] 
Dim Const $arCharacters^ ERROR

Tried removing the brackets and everything.

What a trivial problem to hault my OCR :lmao:


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites



Errr, what are you trying to do? You must assign to a Const and it can't be changed after that. How do you expect to fill the array? Even if that code didn't generate an error, the array is still immutable, so it would be 65*2 elements of 0 ("").

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I see...

Here's what I'm trying to do:

Dim Const $arCharacters[65][2]

$arCharacters[1][0]="A"
$arCharacters[1][1]="0,-1;-1,0;-1,-1;-7,0;-7,-1;"

...

$arCharacters[61][0]="9"
$arCharacters[61][1]="0,-1;-4,-6;-5,0;-6,0;-6,-5;-7,0;-7,-3;-7,-4;-8,0;-8,-1;-8,-2;-8,-3;"
Edited by Insolence

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

Dim $dummy[65][2]

$dummy[1][0]="A"
$dummy[1][1]="0,-1;-1,0;-1,-1;-7,0;-7,-1;"
;...
$dummy[61][0]="9"
$dummy[61][1]="0,-1;-4,-6;-5,0;-6,0;-6,-5;-7,0;-7,-3;-7,-4;-8,0;-8,-1;-8,-2;-8,-3;"

Const $arCharacters = $dummy

And before you ask, Const $dummy = $dummy won't work because you "cannot make existing variables into constants"


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Aye, already tried that :lmao:

Thanks, slug.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0