Creating an Array: Difference between revisions

Content added Content deleted
Line 65: Line 65:
If the array is expected to change size in future, then the programmer can also declare it FLEX.
If the array is expected to change size in future, then the programmer can also declare it FLEX.
FLEX [-10:10] INT flex balanced;
FLEX [-10:10] INT flex balanced;
This next piece of code creates an array of integers. The value of
This next piece of code creates an array of references to integers. The value of
each integer "pointed at" is the square of it's index in the array.
each integer "pointed at" is the square of it's index in the array.
[-10:10] REF INT array of pointers to ints;
[-10:10] REF INT array of pointers to ints;