|Page 1 of 1|
|Author:||amcerbu [ Wed Oct 24, 2012 10:17 pm ]|
I was working on a Tetris program for NXT, and had just created a multi-dimensional array for storing data about the pieces. The compiler told me...
**Error**:Too many array indices. Max allowed is '2'.
Does that mean that only 2-dimensional and smaller arrays are allowed in RobotC? What about an array of structs, where each struct contains an array?
Anyway, here's the code. PIECES, ROTATIONS, and BLOCKS are all #defined at the beginning of the .c file.
|Author:||tfriez [ Thu Oct 25, 2012 9:37 am ]|
|Post subject:||Re: Arrays|
Yes - Only two dimensional arrays are supported in ROBOTC. There are no plans to increase this limitation at the moment.
You can have structs and arrays of structs, however. The support for structs has been greatly increased with ROBOTC 3.5 and above.
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group