STATIC

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > Data types and variables > DIM >

STATIC

 

Description

 

Synonymous of DIM keyword when executed outside any function.

 

When encountered inside a function STATIC define a new local variable whose scope is local to the function.

STATIC variables are created only once when function starts the very first time.

STATIC variables retain their values for the life of the script execution.

 

Syntax

 

see DIM keyword

 

Returns

 

None

 

Parameters

 

Remarks

 

STATIC variables declared at GLOBAL scope level will be automatically transformed into GLOBALs

 

Restrictions

 

See also

 

Examples