Internal representations of arrays

PowerBASIC stores arrays in column-major order: Array(0,0) is first (lowest) in memory, then Array(1,0), then Array(2,0), and so on through all the rows of the array.  After the rows are taken care of, the next column is stored.

While PowerBASIC supports lower boundary values that are non-zero, PowerBASIC generates the most efficient code if the lower boundary parameter is omitted (i.e., the array uses the default lower boundary of zero).

Array boundary values can be obtained at run-time via the LBOUND and UBOUND functions.  Descriptive attributes of an array can be retrieved with the ARRAYATTR function.  These attributes include such information as the data type and the number of dimensions, etc.


See Also

Array Data Types


String arrays

Multidimensional arrays

Array storage requirements

Arrays within User-Defined Types

Array operations