REGIONAL Command

Example   See Also

Creates regional variables and arrays.

Syntax

#REGION nRegionNumber

REGIONAL VarList

Arguments

#REGION nRegionNumber

Creates a region. Regional variables must be declared before they are used in a program. Note that #REGION is a compiler directive, not a command. nRegionNumber specifies a region number 0 through 31.

REGIONAL VarList

Declares the variables for the region created with the #REGION directive. VarList is a list of variables and arrays separated by commas.

During program compilation, if another identically named regional variable has already been compiled when a regional declaration is encountered, the second occurrence of the variable name is made unique to ensure there is no conflict with the previously declared regional variable.

A variable's name is made unique by padding the regional variable's name out to 10 characters with underscores and the current region number. This substitution takes place entirely during program compilation and has no effect on execution speed.

When a variable name is modified, use DISPLAY MEMORY to display the modified variable name. To monitor the variable in the Debug window, use its modified variable name. Since the Trace window uses the original program source code, the original variable name (not the modified name created by the compiler) appears in the Trace window.

Remarks

Variables or arrays with identical names will not interfere with each other if their values are protected within a "region." Regional variables are similar to private variables.