{{fbdoc item="title" value="$STATIC"}}----
Metacommand to change the way arrays are allocated

{{fbdoc item="syntax"}}##
	**'$Static**
		//or//
	[[KeyPgRem|rem]] **$Static**
##
{{fbdoc item="desc"}}
	##**'$Static**## is a metacommand that overrides the behavior of ##[[KeyPgMetaDynamic|$Dynamic]]##, that is, arrays declared with constant subscript ranges are fixed-length. This remains in effect for the rest of the module in which ##**'$Static**## is used, and can be overridden with ##[[KeyPgMetaDynamic|$Dynamic]]##.  It is equivalent to the ##[[KeyPgOptionstatic|Option Static]]## statement.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/meta/static.bas"}}%%(freebasic)
' compile with -lang fblite or qb

#lang "fblite"

'$dynamic
Dim a(100)   '<<this array will be variable-length
'$static
Dim b(100)   '<<this array will be fixed-length
%%

{{fbdoc item="lang"}}
	- Only available in the //[[CompilerOptlang|-lang fblite]]// and //[[CompilerOptlang|-lang qb]]// dialects.

{{fbdoc item="diff"}}
	- When used inside comments it must be the first token

{{fbdoc item="see"}}
	- ##[[KeyPgMetaDynamic|$Dynamic]]##
	- ##[[KeyPgDim|Dim]]##
	- ##[[KeyPgErase|Erase]]##
	- ##[[KeyPgRedim|Redim]]##
	- ##[[KeyPgOptiondynamic|Option Dynamic]]##
	- ##[[KeyPgOptionstatic|Option Static]]##

{{fbdoc item="back" value="CatPgArray|Array Functions"}}{{fbdoc item="back" value="CatPgCompilerSwitches|Compiler Switches"}}{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}}