Updated Comman D; Print Using - Sharp MZ-80B Basic Manual

Personal computer double precision disc
Hide thumbs Also See for MZ-80B:
Table of Contents

Advertisement

2.4 Updated commands
2 .4 . 1

PRINT USING

PRINT USING format ; variable name list
Format
format . . . . . . . . . .
variable name list . . . numeric variables and/or numeric expression
This statement displays the contents of the numeric variable indicated by h he
Function
variable name list operand in the specified format.
Special characters used in the format operand are explained below.
Description
# (used for specifying the number of digits)
The number of # 's is the number of digits to be displayed. Signs (+ and -) are not
counted as digits.
When the number of digits to be displayed is less than that specified, displayed
data is right-justified and vacant spaces are filled with blanks.
+ and - signs
+### : When data is positive, it is perfixed with a + sign and when it is negative,
-### : When data is positive, a space precedes it and when it is negative, a - sign
One character space is reserved for the sign.
t For a variable name list, numeric variables (expressions) are separated with cammas.
string variable consisting of special characters
.
PRINT USING "##,###"
1 2,345
PRINT USING "##,###"
1 , 23 4
5 6 7 . . . . . . . . . . . . Tabs are set every
u
uuuuuuu
P RINT USING "##.##"
1 2 .34 . .
.
. .
. . . . . . . . . . . . .
.
.
.
it is prefixed with a - sign.
precedes it.
PRINT USING "+###,###"
+ 1 23 ,4 5 6
A $ = " -#,###"
;
PRINT USING A $
- 1 234
- 1 ,234
;
1 2345
;
1 234,567
;
represents a space.
"
1 2.345
u
"
.
. Excess decimal places are omitted.
.
.
.
.
;
1 23456
31
digits.
1 0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents