Comet32 Arrays
Comet32 Arrays
There are several important differences in the way arrays are implemented in Comet32 vs. Comet16.
- Array size is no longer an issue. Arrays may be as large as 4.2 gb.
- The limit to the number of dimensions in an array is 255.
- Each dimension in an array starts with element zero. This is a big change from Comet16 where each dimension started with element one.
- The array specification in your program shouldn’t change.
- In Comet16, “ length 5.0 & local x(5)”, meant x(1),x(2),x(3),x(4) and x(5).
- In Comet32, “ length 5.0 & local x(5)”, means x(0),x(1),x(2),x(3),x(4) and x(5).
- The compiler will generate a warning on any FORMAT referencing a multi-dimension array with a repetition factor. Because the runtime code simply iterates through the array's memory for the number of elements beginning with the starting element, you may not get the desired results if the starting element of any dimension is other than zero. If your program was written before element zero was implemented, you must realize that each dimension now has one additional element. The dimensions are contiguous in memory. Even if you are not expecting element zero to be processed, it will be included in the iteration. This is not an issue for arrays with only one dimension. In this case you can simply ignore element zero.
- You may not declare dynamic string arrays.
Back to Comet32