11 - 350 11 - 350
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
PRINT# USING
Instruction
PRINT# USING
• Writes data to a sequential file in the specified format.
PRINT #<file number>,USING ”<display format>”;<data to be written>
file number
• • • •
Specify the file number of a file opened as a
sequential file using the OPEN instruction.
display format
• • • •
Specify the format for characters/numeric values.
Syntax
data to be written
• • • •
Specify the numeric values or character string
expressions to be written to the file.
PRINT #1,
USING “####& &”;A;B$
• • • •
Places the numeric value A according to the # format
and the character string B$ according to the &
format, and writes them to the file opened as file
number 1.
A=1234 B$=”ABCD”
Sequential file #1 1234ABCD
Examples
PRINT #2,
USING “\\###.#”;C
• • • •
Adds \ to the numeric value C and writes it to the file
opened as file number 2. C=456.7
Sequential file #2 \ 456.7
Description
• The PRINT# USING instruction writes data with the specified format to a sequential file.
• In order to use the PRINT# USING instruction, it is necessary to open a sequential file
using the OPEN instruction in advance.
• When the PRINT# USING instruction is executed, the content in <data to be written> is
written to the file according to the format specified by the character string expression. The
data is not displayed on the screen.
See the format specification of the PRINT USING instruction for how to specify
<display format> in the PRINT# USING instruction.
REMARK
See the PRINT, PRINT USING and PRINT# instructions, and Chapter 6.