HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4-: 53
condition
Examples
The following examples show the use of the FILTER statement.
400 FILTER USING 300; ALL
410 FILTER USING Thread_list; TRIM$(Name$)="widgets" AND
Price < .25
FIXED
The FIXED statement sets the default numeric output format to fixed-point
and specifies the number of digits to be printed to the right of the
decimal point. The FLOAT and STANDARD statements also set the default
numeric output format.
Syntax
FIXED
num_expr
Parameters
num_expr
Its rounded value,
n
, must be in the short integer
range. When HP Business BASIC/XL outputs a number in
fixed-point format, it prints
n
digits to the right of
the decimal point. If
n
is less than one, HP Business
BASIC/XL prints no decimal point and no decimal digits.
If
n
is greater than 16, HP Business BASIC/XL prints 16
decimal digits.
A numeric literal that is expressed in scientific notation can be printed
in fixed-point format, but it will be followed with E+
nn
for exponents
that are less than two digits andE+
nnn
for exponents that are three
digits. Each
n
is a digit.
Examples
10 FIXED 2
20 PRINT 123;.4567;-79810;-1.235E+47
99 END
The above program prints:
123.00 .46 -78910.00 -1.24E+47
If line 10 is changed to
10 FIXED 3
then the program prints:
123.000 .457 -78910.000 -1.234E+47
FLOAT
The FLOAT statement sets the default numeric output format to
floating-point and specifies the number of digits to be printed to the
right of the decimal point. The FIXED and STANDARD statements also set
the default numeric output format.
Syntax
FLOAT
num_expr
Parameters
num_expr
Its rounded value,
n
, must be in the short integer
range. When HP Business BASIC/XL outputs a number in
fixed-point format, it prints
n
digits to the right of
the decimal point. If
n
is less than one, HP Business
BASIC/XL prints no decimal point and no decimal digits.
If
n
is greater than 16, HP Business BASIC/XL prints 16
decimal digits.