Skip to content

Variable Declarations

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

Home › Variable Declarations › Variable Declarations

Variable Declarations

Statements to declare and allocate space for variables.

Dim

Declares a variable at the current scope.

Const

Declares a non-modifiable variable.

Scope

Begins a new scope block.

Static

Declares variables in a procedure that retain their value between calls.

Shared

Used with Dim allows variables to be visible throughout a module.

Var

Declares variables where the data type is implied from an initializer.

Byref (Variables)

Used with Dim or Static or Var allows to declare references.


Category: Variable Declarations


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