◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── The $STATIC metacommand sets aside storage for arrays during compilation. The $DYNAMIC metacommand sets aside storage from arrays while the program is running. REM $STATIC or ' $STATIC REM $DYNAMIC or ' $DYNAMIC Usage Notes ■ When the $STATIC metacommand is used, the ERASE statement reinitializes all array values to zero (numeric arrays) or the null string (string arrays) but does not remove the array. ■ $DYNAMIC allocates storage for arrays while the program is running. This means that the ERASE statement removes the array and frees the memory it took for other uses. You also can use the REDIM statement to change the size of an array allocated using $DYNAMIC. ■ The $STATIC and $DYNAMIC metacommands affect all arrays except implicitly dimensioned arrays (arrays not declared in a DIM statement). Implicitly dimensioned arrays are always allocated as if $STATIC had been used. ■ All arrays inside a SUB or FUNCTION procedure are dynamic unless the STATIC keyword is included in the SUB or FUNCTION statement.