Skip to content

OPTION STATIC


Reverts to default array declaration behavior

Syntax

` Option Static

`

Description

Option Static is a statement that overrides the behavior of Option Dynamic, that is, arrays declared with constant subscript ranges are fixed-length. This remains in effect for the rest of the module in which Option Static is used, and can be overridden with Option Dynamic. It is equivalent to the '$Static metacommand.

Examples

start GeSHi

vb
'' Compile with the "-lang fblite" compiler switch

#lang "fblite"

Option Dynamic

Dim foo(100) As Integer         ' declares a variable-length array

Option Static

Dim bar(100) As Integer         ' declares a fixed-length array

end GeSHi

Dialect Differences

Differences from QB

  • New to FreeBASIC

See also

  • '$Dynamic
  • '$Static
  • Dim
  • Erase
  • Redim
  • Option Dynamic
  • Static

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft