HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
6-: 20
The above program prints:
123
.4567
-1.234E+47
123.4567-1.234E+47
cat
catbird
123cat.4567bird-1.234E+47
Space Specifiers
A space specifier specifies one or more spaces.
Syntax
[
num_expr1
]X[X]...
Parameters
num_expr1
Repeat factor. Its value is rounded to a short integer.
The specifier nX is equivalent to a sequence of nX symbols. The DISP
USING or PRINT USING statement prints one space for every X.
Examples
110 DISP USING "3D,XXX,3D,XXX,3D"; 123,456,789
120 DISP USING "3D,3X,3D,3X,3D"; 123,456,789
999 END
The above program prints:
123 456 789
123 456 789
Dollar Specifier
A dollar specifier specifies a dollar sign ($) and consists of one
symbol, $. When the symbol $ precedes a numeric specifier, the DISP
USING or PRINT USING statement prints a dollar sign ($) before printing
the value that corresponds to the numeric specifier. The statement
prints the dollar sign immediately before the first printed digit of the
output value.
Syntax
$
Examples
10 A=1234
20 DISP USING "$DCDDD.DD"; A
30 DISP USING "$DDDCDDD.DD"; A
40 DISP USING "$DDDCDDZ.DD"; A
50 DISP USING "$ZZZCZZZ.DD"; A
99 END
The above program prints:
$1,234.00
$ 1,234.00
$ 1,234.00
$1,234.00
$001,234.00