Specifications
301
■
stringformat
stringformat is a formatting string consisting of !, @, and/or &&, each of which
causes a special printing effect as described below.
! Displays the first character of the stringexpression.
@ Displays the entire stringexpression.
&& Displays the first n+2 characters of the stringexpression, where n is
the number of spaces between the ampersands (&&).
If the format field specified by
stringformat is longer than the
stringexpression, the string is left-justified and padded with space; if
it is shorter, the extra characters are truncated.
Below are statement examples containing incorrect formatting strings.
■
expression or stringexpression
If more than one number or string is specified, the PRINT USING statement dis-
plays each of them according to numericformat or stringformat, respec-
tively.
PRINT USING "###";a,b,c
Statement example:
PRINT USING "!";"ABC"
Output:
Statement example:
PRINT USING "@";"ABC"
Output:
Statement example:
PRINT USING "& &";"ABCDE"
Output:
Example:
PRINT USING "Answer=###";a
Example:
PRINT USING "####.# ######";a,b
A
ABC
ABCDE