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

6- 13
Table 6-11. Format Specifiers
---------------------------------------------------------------------------------------------
|||||
| Specifier | Specifies | Symbolized by | Can Contain Repeat |
||||Factor |
|||||
---------------------------------------------------------------------------------------------
|||||
| Numeric | One numeric output | D,Z,*,.,R,S, M,C,P,E | Yes |
| | item. | | |
|||||
---------------------------------------------------------------------------------------------
|||||
| String literal | That the literal be | Quoted string | No |
| | printed exactly. | literal. | |
|||||
---------------------------------------------------------------------------------------------
|||||
| String | One string output | A | Yes |
| | item. | | |
|||||
---------------------------------------------------------------------------------------------
|||||
| Compact | One numeric or string | K | No |
| | output item. | | |
|||||
---------------------------------------------------------------------------------------------
|||||
| Space | One or more spaces. | X | Yes |
|||||
---------------------------------------------------------------------------------------------
|||||
| Dollar | Dollar sign. | $ | Yes |
|||||
---------------------------------------------------------------------------------------------
|||||
| Control Character | That control | #,+,-,@,/ | No |
| | characters be printed | | |
| | or suppressed. | | |
|||||
---------------------------------------------------------------------------------------------
Starting with the leftmost output item in the display list and starting
at the beginning of the format string or IMAGE statement, HP Business
BASIC/XL matches each output item to the next numeric, nonliteral string,
or compact specifier. For example, in the statement
100 DISP USING "2X,DD,3X,5A"; 12,"HELLO"
2X and 3X are space specifiers, the numeric specifier DD corresponds to
the value 12 and the string specifier 5A corresponds to the value
"HELLO".
If the specifiers outnumber the output items, HP Business BASIC/XL
ignores the extra specifiers. For example, in the sequence
200 PRINT USING 210; A,B
210 IMAGE Z,X,D,2X,ZZ,3X,DD
the numeric specifier Z corresponds to the variable A, X is a space
specifier, the numeric specifier B corresponds to the variable B, and the
specifiers 2X,ZZ,3X, and DD are ignored.
If the output items outnumber the specifiers, HP Business BASIC/XL reuses
the format string or IMAGE statement. For example, in the statement
300 DISP USING "5A,X,2D,X"; "HELLO",12,"HOWDY",34
the string specifier 5A corresponds to "HELLO" and "HOWDY" and the
numeric specifier 2D corresponds to 12 and 34.