NAME
-
$static - make arrays static by default
SYNOPSIS
-
rem $static
DESCRIPTION
-
The $static metacommand appears in the program as part of a remark,
either after the rem keyword or after a single quote. The appearance
of this metacommand implies that an array dimensioned with the dim
statement will be static rather than dynamic unless a dimension of the array
is declared with a nonconstant expression (see dim). This implication
overrides any previous $dynamic metacommand and may be overridden by a
subsequent $dynamic metacommand (see $dynamic).
If no $static or $dynamic metacommand appears and no other
condition implies dynamic, arrays will be static.
EXAMPLE
-
The program
dim a(5)
rem $dynamic
dim b(5)
rem $static
dim c(5)
n = 5
dim d(n)
Creates static arrays "a" and "c" and dynamic arrays "b" and "d". Note that
"a" is static in the absence of any $static or $dynamic. Also note
that, despite the $static, "d" is dynamic because it is declared with a
subscript that is not a constant expression.
SEE ALSO
-
dim, $dynamic
from
The Basmark QuickBASIC Programmer’s Manual
by
Lawrence Leinweber