QBasic 1.1: $STATIC Metacommand
Explanation
$STATIC, $DYNAMIC Metacommands
Set the default array storage.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
{REM | '} $STATIC |
{REM | '} $DYNAMIC |
Description / Parameter(s)
REM | '} |
REM or a remark character (') must precede metacommands. |
$STATIC |
Specifies that arrays declared in subsequent DIM statements are static arrays (unless they are declared in a non-static SUB or FUNCTION procedure). Array storage is allocated when you start the program, and remains fixed. |
$DYNAMIC |
Specifies that arrays declared in subsequent DIM statements are dynamic arrays. Array storage is allocated dynamically while the program runs. |
DIM and REDIM usually provide a better way to specify whether arrays are dynamic or static. |