
RPBASIC-52 PROGRAMMING GUIDE
2-117
USING
U.
Syntax: PRINT USING (format)
PRIN T U.(format)
Where: format
USING(Fn) n is the number of significant digits. A m inimum of 3 significant digits are
always printed. Maximum value of n is 8.
USING(#.#) The number of # symbols determines how many significant figures of the
output value will be displayed before and after the decimal point. The
maximum total num ber of "#" sym bols is 8. Integers (decim als truncated) are
printed when there are no "#" symbols after the decimal point or if no decimal
point is given. If a value cannot be printed in the requested format, RPBASIC-
52 outputs a "?" and prints the value in USING (0) format.
USING(0) The default output format for RPBASIC-52 floating-point values. Displayed
as a decimal integer and fraction if the value is betw een +/- 99999999 and +/-
0.1.
Function: Used with PRINT to format subsequent expressions.
Mode: Command, run
Use: PRIN T US ING (F3),A
Cards: All
DESCRIPTION
The same forma tting capability is ava ilable using the STR(10 ,...) functio n.
Formatting is "remembered" until it is reset or changed.
RELATED STR
ERRORS BAD SYNT AX - M issing # to the left of the decimal point or a space between USIN G and the left
parentheses.
EXAMPLE
110 PRINT USING(F3),PI*100
>run
3.14 E+2
Komentáře k této Příručce