
Commands - 98
PRINT USING
Statement
SYNTAX: PRINT [#n,]USING"format string"; expr ession
PURPOSE: To print strings or number s using a specified form at.
REMARK S: n = valid port number. Port numbers are 1 and 2 for serial; 9 for VF display; 10 for LCD
character and graphics display. LCD and VF displays must be configured using the CONF IG
DISPLAY command before use.
The format string is one or two strings that specify the print format. The three possibilities are:
# Used to specify the num ber of digits to be printed on each side of the decim al point.
$$$$ Used to pr int numbers in scientific or enginee ring notation . T his form at string m ust contain
4 carets and be used in conjunction with the # form at string. Failur e to do the latter will
produce unpr edictable results.
. Used to specify the location of the decimal point in a field determined by the use of #.
NOTE: You cannot print a string expression in the same line containing a format declaration. The
string will be taken as num erical.
RELATED: PRINT, PRINT$
EXAMPLE: A = 1.2345
PRINT USING "##.##";A;
1.23
PRINT USING ".##";A
%1.23
The % sign indicates that the number contained digits outside the specified field.
A = 1234.67
PRINT USING "#.##$$$$";A
0.12E+4
In this case the fir st # specifies the leading zero to the left of the dec imal point.
PRINT USING "##.##$$$$;A
1.23E+3
Kommentare zu diesen Handbüchern