Hi
Really enjoying digging into Zorro - elegant, powerful, stable, fast and well documented... What's not to like? Many thanks to the developers!
But I'm not understanding why I'm getting a compiler syntax error when I try to initialise an array length with an integer constant set at runtime.
Obviously, scaling the array with a primitive int compiles:
My understanding is that in C any integer constant should also work, but these are failing to compile in Lite-C:
#define FOO_LENGTH 12;
int foo[FOO_LENGTH];
const int FOO_LENGTH = 12;
int foo[FOO_LENGTH];
(I have to set the values in a loop, so I can't size the array with the int foo = {1,2,3} syntax.)
I'd really appreciate some insight into why this is not legal, and suggestions about an alternative approach.
Thanks in advance!