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

6Ć39
The next print expression would start in column 41:
column 1
column 41
CHARACTERS
40-CHARACTER FIELD
Print statements 20,30,40, and 50 would appear as follows:
ăăăăăăăăăăăăăăăăă CHARACTERS
CHARACTERS
000000000000000000000000000000CHARACTERS
TRUE.
The L/R/C/Z formats are used mainly for string fields. These formats
can, however, be used to print any data type. If these formats are
used to print a numeric field, the resulting number will be in the
same decimal format as described for the unformatted PRINT:
D BASIC will use the 8 digits of significance available and attempt
to locate the decimal point such that there is no need for an
exponent (123.45678 or .12345678 or 1234567.8).
D If this is not possible, the number will be given one numeric
position to the left of a decimal point and an exponent will be
used (3.7836524E+12).
In either case, the number will be treated just like a string" and will
be right or left justified using the same rules as a string would be
when using the L/R/C/Z formats.
Only numeric expressions can use the decimal (D) format of PRINT
USING. This includes integers or floating point numbers (decimal
numbers). The following are some examples using the D format:
5 BIG_NUMBER =21.7654E+10
7 FIELD_WIDTH = 40
10 PRINT USING D(FIELD_WITH+5) .2:BIG_NUMBER
15 SPEED = 2.887654
20 PRINT USING D25.6:SPEED
25 REFERENCE% = 124
30 PRINT USING D10.1:REFERENCE%
column 1 ăăă column 26 ă ă ă column 46
123456789012345678901234567890123456789012345
ă 124.0
Statement 30 2.887654
Statement 20
21765400
0000.00
Statement 10
Note that, when the integer REFERENCE% was printed with a
format of D10.1, the numbers after the decimal were added and set
to zero even though REFERENCE% as an integer has no fractional
part. This will occur with all integers when the number of decimal