Dimension, Declare
These two identical commands create new arrays or change the size of existing ones.
Usage |
DIMENSION | DECLARE ArrayName( nRows [, nCols ] ) [, aArray2( nRows2 [, nCols2 ] ) ...] |
DIMENSION scopes arrays as private. The commands PUBLIC [ARRAY] and LOCAL [ARRAY] use the same arguments to create arrays of global and local scope, respectively. A classic example of dBloat. Either a new command PRIVATE [ARRAY], dropping the DIMENSION/DECLARE syntax, or preferably DIMENSION [ PUBLIC | PRIVATE | LOCAL ] would make more sense to us. |
Example |
DIMENSION aMyArray[3], aMyOtherArray[10,17] * Add to an existing array SELECT category FROM masterlist INTO ARRAY aCategory DIMENSION aCategory[ ALEN(aCategory, 1) + 1 ] aCategory[ ALEN(aCategory, 1) ] = "Other" |
See Also |
ACopy(), AElement(), ALen(), Array Manipulation, Local, Public |