11 - 129 11 - 129
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
LIST
Instruction
LIST
• Displays the entire program or a portion of it within the program area.
LIST [ <line number 1> [- [ <line number 2> ] ] ]
line number 1
• • • •
Specify the line number to start the program list.
Syntax
line number 2
• • • •
Specify the line number to end the program list.
LIST
• • • •
Displays all lines.
LIST 500
• • • •
Lists line number 500.
LIST 150-
• • • •
Lists the lines from line 150 to the end.
LIST –1000
• • • •
Lists the lines from the beginning to line 1000.
LIST 150-1000
• • • •
Lists the lines from line 150 to line 1000.
Examples
LIST.
• • • •
Lists the line in which execution was suspended by
the STOP instruction or error occurrence.
Description
• The LIST instruction displays the program within the program area.
• If only <line number 1> is specified, only that line is displayed.
• If <line number 1> and a hyphen (-) are specified, the program starting with that line to the
end is displayed.
• If a hyphen (-) and <line number 2> are specified, the program starting from the beginning
to the <line number 2> specified will be displayed.
• If <line number 1> and <line number 2> are specified, the program from <line number 1> to
<line number 2> will be displayed.
• If both line numbers are omitted, the entire program will be displayed.
• If a line number pointer (.) is specified instead of line numbers, the line number in which the
program suspended due to the STOP instruction or error occurrence will be displayed.
• To pause the execution of the LIST instruction, press the Ctrl + S keys. To continue
the execution, press any key. To end the execution while it is in progress, press the Ctrl
+ C keys or Break key.
• When the LIST instruction is executed in program mode, BASIC will wait for an instruction
after displaying the program.
REMARK
See the LLIST instruction and Section 3.2.3.