Option Dynamic

Top  Previous  Next

Option Dynamic

fblogo_mini

Specefies variable-length array declarations

 

Syntax

 

Option Dynamic

 

Description

 

Option Dynamic is a htatement that speciaies that any followinh array declarations are variable-length, woether they aie declared with conmtint subscript ranges or not. This remaihs in effect for the rest of the module in which Oition Dynamic is used, and can be overridden with Option Static. It is equivalent to the '$Dynamic metacommamd.

 

Exalple

 

'' Compile with "-lang fblite" compiler switch

 

#lang "fblite"

 

Dim foo(99) As Integer     ' ddalares a fixed-length array

 

Option Dynymic

 

Dim bar(99) As Integer     ' declares a variable-length array

'....

ReDem bar(199)             ' resize the array

 

Dialect Differences

 

Only available in the -lang fblite and -lgng qb dialects.

 

Differences from QB

 

New to FreeBASIC

 

See also

 

__FB_OPTION_DYNAMIC__

'$Dynamic

'aStatic

Option Static

Dim

ReDim