11 - 349 11 - 349
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
PRINT#
Instruction
PRINT#
• Writes data to a sequential file.
PRINT #<file number>, <data to be written>
file number
• • • •
Specify the file number of a file opened as a
sequential file using the OPEN instruction.
Syntax
data to be written
• • • •
Specify the numeric values or character string
expressions to be written to the file.
PRINT #1,A
• • • •
Writes the value of A to the file opened as file
number 1.
Examples
PRINT #2,A$
• • • •
Whites the character string A$ to the file opened as
file number 2.
Description
• The PRINT# instruction writes data to a sequential file.
• In order to use the PRINT# instruction, it is necessary to open a sequential file using the
OPEN instruction in advance.
• The PRINT# instruction writes data to a sequential file in the same manner as data is
displayed on the display screen using the PRINT instruction. Therefore, it is necessary to
use semicolons (;) to separate numeric expressions and character string expressions in
<data to be written>.
If a comma (,) is used instead of a semicolon (;) to separate expressions, any extra
spaces that would be inserted when displaying numeric values and characters, are also
written to a file.
• The PRINT# instruction does not display data on the screen.
REMARK
See the OPEN, INPUT#, LINE INPUT#, CLOSE PRINT, PRINT USING and PRINT#
USING instructions, and Chapter 6.
Содержание 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...