Help does not say a variable not allowed in fact it's refered to as size.
It appeared just now, first time I tried it in GCB.
My sprite game has 8 sprites and arrays are set to (8).Nice if I could change the number universally through the program with a var. I used a var instead of 8 for 2 arrays and got var not defined error so seems var not allowed, must be constant.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Array Length Element 0 should not be used to obtain the length of the array. Element 0 will only be a consistent with respect to the length of the array when the array is set as shown above.
Start all arrays from 1 or more. Never 0.......for picaxe users whose code didn't work with GCB.
'
serious. I wasted days. One byte out :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a constraint that we have investigated and we are not able to change. The impact is very large. We have completed an engineering review this year and we cannot change at the moment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried
but get var2 not defined error
Can an array size be a variable?
Is this a new error? Just appeared in the version you are using?
What version are using? If a Patch-KIt what date is the compiler.
But, I believe, this would have to constant not a variable, But, did this work in the past?
Help does not say a variable not allowed in fact it's refered to as size.
It appeared just now, first time I tried it in GCB.
My sprite game has 8 sprites and arrays are set to (8).Nice if I could change the number universally through the program with a var. I used a var instead of 8 for 2 arrays and got var not defined error so seems var not allowed, must be constant.
True. Will update the Help.
Use a Constant.
Updated the Help... constant or a fixed number.
See https://github.com/Anobium/Great-Cow-BASIC-Help/blob/master/source/arrays.adoc
Array Length Element 0 should not be used to obtain the length of the array. Element 0 will only be a consistent with respect to the length of the array when the array is set as shown above.
Start all arrays from 1 or more. Never 0.......for picaxe users whose code didn't work with GCB.
'
serious. I wasted days. One byte out :)
This is a constraint that we have investigated and we are not able to change. The impact is very large. We have completed an engineering review this year and we cannot change at the moment.