Sharp mz-800 Owner's Manual page 84

Hide thumbs Also See for mz-800:
Table of Contents

Advertisement

(h) ttt
Four exponential operators may be included at the end of a format string
to control the display of numbers in exponential format.
10
A=51123
20 PRINT USING "##.# #ATTIT A
RUN
ws 5,112E+04
In this case, the first number sign is reserved for display of the sign of the
number.
(i) Extended list of operands
A list of variables may be specified following a single PRINT USING state-
ment by separating them from each others with commas or semicolons. When
this is done, the format specified in <format string> is used to display
all resulting values.
10 A=5.3: B=6.9: C=7.123
20 PRINT USING "##.4## #"; Fase
A,B,C
RUN
us 5.300 , 6.900 _, 7.123
The result is the same regardless of whether semicolons or commas are used
to separate variables.
(2)
Formatting characters for string values
(a)!
An exclamation mark in < format string> specifies that only the first charac-
ter in the given string is to be displayed.
10 A$= "CDE"
20 PRINT USING ''1'';A$
RUN
c
(b) & sk
Ampersands with n spaces between them specify that the first 2 +n charac-
ters in the specified string are to be displayed. If the string is shorter than
the field defined by <&_..4.,..&>, it will be left-justified in the field
and padded with spaces on the right. If the string is longer than the field,
the extra characters will be ignored.
10 A$="'ABCDEFGH"'
20 PRINT USING "8&4 .4.UU8'A$
RUN
ABCDEF
10 AS=""XY"
20 PRINT USING "&4.4.U8A$
RUN
XYuuw
6-27

Advertisement

Table of Contents
loading

Table of Contents