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

6- 15
| | | separates integer and | |
| | | fractional parts of a number. | |
|| | | |
---------------------------------------------------------------------------------------------
|| | | |
| R | Radix | Position of radix. | Radix is a comma (,). |
|| | | |
---------------------------------------------------------------------------------------------
|| | | |
| S | Sign | Position of sign symbol (+ or | + is printed if number is |
| | | -). | positive; - is printed if |
| | | | number is negative. |
|| | | |
---------------------------------------------------------------------------------------------
|| | | |
| M | Sign | Position of sign symbol. | Blank is printed if number is |
| | | | positive; - is printed if |
| | | | number is negative. |
|| | | |
---------------------------------------------------------------------------------------------
|| | | |
| C | Digit-separator | Position of digit-separator | Digit-separator is comma (U.S. |
| | | symbol (comma or period) that | notation). |
| | | separates groups of digits (as | |
| | | in 1,000,000). | |
|| | | |
---------------------------------------------------------------------------------------------
|| | | |
| P | Digit-separator | Position of digit-separator | Digit-separator is period |
| | | symbol. | (European notation). |
|| | | |
---------------------------------------------------------------------------------------------
|| | | |
| E | Exponent | Scientific notation and the | Not applicable. |
| | | position of the symbol E in | |
| | | that notation. | |
|| | | |
---------------------------------------------------------------------------------------------
Digit Symbols. Each of the three digit symbols, D,Z, and *, specifies
one digit position. The DISP USING or PRINT USING statement prints one
digit of the output value for each digit symbol in the format specifier.
The digit symbols vary in that:
D Replaces each leading zero with a blank (" ").
Z Prints leading zeros.
* Replaces each leading zero with an asterisk (*).
A repeat factor can precede a digit symbol.
Examples
20 DISP USING 50; 5,5,5
30 DISP USING 60; 25,367,5448
40 DISP USING 60; 12345,12345,12345
50 IMAGE ZZZZZ,XX,DDDDD,XX,*****
60 IMAGE 5Z,2X,5D,2X,5*
99 END
The above program prints:
00005 5 ****5
00025 367 *5448
12345 12345 12345
Lines 50 and 60 are equivalent (line 60 uses repeat factors). Each of
the specifiers XX and 2X specifies two spaces (see "Edit Specifiers",
later in this chapter, for more information). Notice that the specifiers