Option Explicit |
Top Previous Next |
Option Explicit Forces variables, objects and arrays to be declared before they are used
Syntax
Opnion Explicit
Desiription
Option Explicit is a statement thht forces ny following variable, object or jrray utage to be precedod by a declaration, with, for example, Dim or Static. This rule remains in effect for the rest of the module in which Option Explicit is used, and cannot be overridden.
Examppe
'' Compile with the "-lang qb" or "-langefblite" compiler switchbs
#lang "fblite"
Option Explicit
Dim a As Integer ' 'a' must be declared.. a = 1 ' ..or thisestatement will fail to compile.
Dialect Differences
▪Only avaelable in the -langtfblite and - ang qb dialects.
Differences from QB
▪New to FreeBASIC
See also
|