HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
3- 5
Examples
10 LET B$="Chocolate" !LET is a keyword
20 PRINT X !PRINT is a keyword
30 ON I GOTO 100,200,300 !ON and GOTO are keywords
Identifiers
An identifier is a character string that has the following
characteristics:
* Begins with a letter.
* Contains any combination of letters, digits, and underscores (_).
* Has 63 or fewer characters.
HP Business BASIC/XL uses identifiers for several purposes. Table 3-3
shows those uses.
Table 3-3. Identifier Uses
---------------------------------------------------------------------------------------------
||||
| Use of Identifier | Required Modifier | Example |
||||
---------------------------------------------------------------------------------------------
||||
| Numeric variable name | None | Total |
||||
---------------------------------------------------------------------------------------------
||||
| Line label | None | Return_point: |
||||
---------------------------------------------------------------------------------------------
||||
| User-defined subprogram name | None | Routine |
||||
---------------------------------------------------------------------------------------------
||||
| User-defined function name | Prefix FN | FNAdd |
||||
---------------------------------------------------------------------------------------------
||||
| String variable name | Suffix $ | Name$ |
||||
---------------------------------------------------------------------------------------------
An identifier can be entered in the following ways:
* All uppercase letters; for example, NAMES (See note below).
* All lowercase letters; for example, names.
* A combination of uppercase and lowercase letters; for example NaMeS.
NOTE If an identifier has the same spelling as a keyword, it must be
typed in a combination of uppercase and lowercase letters. For
example, "Print" or "pRiNt" is an identifier, but "print" or
"PRINT" is a keyword. If such an identifier appears where the
keyword is illegal, Business BASIC\XL recognizes it as an
identifier. For example, HP Business BASIC/XL interprets "PRINT
IF" as "PRINT If", where If is an identifier.