Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 78

6Ć38
formatted_print_list =
list of formatted data fields
The individual formatted data fields have the following form:
where:
L
LeftĆJustify the print expression
R
RightĆJustify the print expression
C
Center the print expression in the field
Z
Load leading zeros in front of the print
expression
D
Print the numeric field in a decimal
format
The field width has only one part if the format
type is L/R/C/Z, in which case the field width is
an integer or integer expression from 1 to 132.
If the decimal format D is used, the field width
has 2 parts:
Integer1 is the total field width for the result.
This includes the minus sign (if any), the
number part to the left of the decimal point, the
decimal point, and any number on the right of
the decimal point. This total field may be in the
range 3 to 132.
Integer2 specifies the number of decimal
places to the right of the decimal point to be
printed. This number may be in the range 0 to
26.
Integer1 and integer2 may be either integer
literals or integer expressions. If expressions
are used, they must be enclosed in
parentheses.
Data item to be printed. Multiple items are
separated by commas or semiĆcolons. See the
PRINT statement for more information on
commas and semiĆcolons when printing.
The following are PRINT USING examples using the L/R/C/Z
FORMATS:
ă2 A% = 14 \ B% = 26 \ BOOLEAN@ = TRUE
ă5 STRING$ = CHARACTERS"
10 PRINT USING L40:STRING$
20 PRINT USING R40:STRING$
30 PRINT USING C(A% + B%):STRING$
40 PRINT USING Z40:STRING$
50 PRINT USING L40:BOOLEAN@
Statement 10 will left justify CHARACTERS" in a 40Ćcharacter field
beginning with column 1.