HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

3- 10
* Whether program main is the outer block for a multiprogram
application.
The OPTION and GLOBAL OPTION statements are explained in chapter 4.
Variable Declaration
A variable can be declared as local to one program unit or common to two
or more program units. A local variable can be accessed only by the
program unit in which it is declared, whereas a common variable can be
accessed by every program unit that declares it.
A local variable can be declared explicitly by a variable declaration
statement, or implicitly the first time it is used. A common variable
must be explicitly declared with the COM statement in every program unit
that uses it.
Table 3-9 lists the variable declaration statements and the
characteristics of the variables that they can declare.
Table 3-9. Variable Declaration Statements
---------------------------------------------------------------------------------------------
| | |
| Variable Declaration Statement | Type of Variables Declared |
| | |
---------------------------------------------------------------------------------------------
| | |
| COM | Any |
| | |
---------------------------------------------------------------------------------------------
| | |
| DIM | Any |
| | |
---------------------------------------------------------------------------------------------
| | |
| SHORT INTEGER | Short Integer |
| | |
| SHORT INT | |
| | |
---------------------------------------------------------------------------------------------
| | |
| INTEGER | Integer |
| | |
| INT | |
| | |
---------------------------------------------------------------------------------------------
| | |
| SHORT REAL | Short Real |
| | |
| SHORT | |
| | |
---------------------------------------------------------------------------------------------
| | |
| REAL | Real |
| | |
---------------------------------------------------------------------------------------------
| | |
| SHORT DECIMAL | Short Decimal |
| | |
| SHORT DEC | |
| | |
---------------------------------------------------------------------------------------------
| | |
| DECIMAL | Decimal |
| | |