|
REDIM
Feb 16, 2021 9:58:34 GMT 1
Post by ptitjoz on Feb 16, 2021 9:58:34 GMT 1
Hello when i want to use REDIM i get an error. Where can this error come from? Best regards
DECLARE Matrice$[100] TYPE STRING cpt=-1 DATA "Line 1" DATA "Line 2" DATA "Line 3"
REPEAT READ a$ INCR cpt PRINT cpt," ",a$ UNTIL a$=""
REDIM Matrice$ TO cpt-1
13:10: error: 'Matrice__b2c__string_var__b2c_array' undeclared (first use in this function); did you mean 'Matrice__b2c__string_var'?
|
|
|
REDIM
Feb 16, 2021 10:35:56 GMT 1
Post by vovchik on Feb 16, 2021 10:35:56 GMT 1
Dear ptitjoz,
You have to declare your array to be dynamic before changing the dimensions, i.e.:
'DECLARE Matrice$[100] TYPE STRING DECLARE Matrice$ TYPE STRING ARRAY 100 cpt=-1 DATA "Line 1" DATA "Line 2" DATA "Line 3"
REPEAT READ a$ INCR cpt PRINT cpt," ",a$ UNTIL a$=""
REDIM Matrice$ TO cpt-1
With kind regards, vovchik
|
|
|
REDIM
Feb 16, 2021 14:28:35 GMT 1
Post by ptitjoz on Feb 16, 2021 14:28:35 GMT 1
thank you very much vovchik!
have a nice day
|
|