Skip to content

Dynamic

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Array Functions › $Dynamic

$Dynamic

Metacommand to change the way arrays are allocated

Syntax

'$Dynamic
Rem $Dynamic

Description

'$Dynamic is a metacommand that specifies that any following array declarations are variable-length, whether they are declared with constant subscript ranges or not. This remains in effect for the rest of the module in which '$Dynamic is used, and can be overridden with '$Static. It is equivalent to the Option Dynamic statement.

Remarks

Dialect Differences

Differences from QB

  • When used inside comments it must be the first token

See also

Examples

' compile with -lang fblite or qb

#lang "fblite"

'$DYNAMIC

Dim a(100)

'......

ReDim a(200)

Category: Array Functions
Kind: keyword


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally