11 - 348 11 - 348
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Format character
Function
Example
“,”
• If a comma is specified to the left of a decimal point
in the format string, digits in the integer part is
divided in three-digit units by commas and then
displayed.
• A comma reserves an area for one digit.
• A comma is invalid if used together with the
exponential format (^^^^).
PRINT USING “ ###,.##” ;1234.5
1,234.50
OK
PRINT USING “ ####.##,” ;1234.5
1234.50,
OK
“^^^^”
• If these characters are placed at the end of a string
that specifies a number of digits, a numeric value is
displayed in the exponential format.
• ^^^^ reserves an area for the displayed
characteristic E+XX.
• The valid digits are displayed left-justified together
with the characteristic.
• If a + sign or a +/ sign is not specified at the
beginning or end of the format string, respectively,
a blank space or a – sign is displayed for the
integer part.
PRINT USING “ ##.##^^^^” ;234.56
2.35e+02
OK
PRINT USING “ .####&&&&” ;888888
.0889e+07
OK
PRINT USING “ +.##&&&&” ;123
+.12E+03
OK
If 25 digits or greater are specified, an "Illegal function call" error occurs.
[Multi-field]
It is possible to specify multiple format strings in one PRINT USING instruction. In addition,
each of the format strings can be separated by characters other than the format characters.
Each of the format strings corresponds to a character string or value to be output, and their
order. If the number of format strings is smaller than the number of input data, the
correspondence returns to the first format string and is repeated.
Example
PRINT USING “No. ##### AD51H & &”;12345;” BASIC Instruction Manual”
No. 12345 AD51H BASIC Instruction Manual
OK
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...