Community QBasic

Rebooting the QBasic we all know and love!


Project maintained by Cory Smith

$DYNAMIC

Set the default array storage.

Example

REM $DYNAMIC

REM $STATIC

$DYNAMIC specifies that arrays declared in subsequent DIM statements are dynamic arrays. Array storage is allocated dynamically while the program runs.

$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.

NOTE: It is generally better to use DIM and REDIM to specify whether arrays are dynamic or static.

See Also