back to Command Reference
[FX-870P/VX-4]
Display output formatted according to a format specification.
PRINT USING "format_spec"; output_element [; output_element]*
PRINT USING "###.##"; X
PRINT USING "& &"; A$
| Character | Meaning |
|---|---|
# |
Digit position. Also used for sign and decimal point placement. |
& |
String placeholder. The output string is displayed with a length equal to the number of & characters. |
# characters define digit positions. Include a
decimal point in the format to specify the number of decimal places. For
example, ###.## displays a number with up to 3 integer digits and 2
decimal digits.& characters define the display width. The string
is displayed with a length matching the number of & characters.LPRINT USING for printer output and
PRINT # USING for file output.10 X = 3.14159
20 PRINT USING "###.##"; X
30 A$ = "HELLO"
40 PRINT USING "&&&&&&&&&&"; A$
Displays ` 3.14 and HELLO ` with formatted output.