11 - 362 11 - 362
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
RESTORE
Instruction
RESTORE
• Specifies a line number in such a way that a subsequent READ instruction reads values of
the DATA instruction, starting from the first data in the DATA instruction in the specified
line number.
RESTORE [<line number>]
Syntax
line number
• • • •
Specify the line number of the next DATA instruction
to be read.
Examples
RESTORE 60
• • • •
Starts reading data in the DATA instruction in line 60.
Description
• The RESTORE instruction specifies a line number in such a way that a subsequent READ
instruction reads values of the DATA instruction, starting from the first data in the DATA
instruction in the specified line number.
• If <line number> is omitted, the READ instruction after the execution of the RESTORE
instruction reads values from the first DATA instruction in the program.
• If <line number> is specified, the READ instruction after the execution of the RESTORE
instruction starts reading from the first value of the DATA instruction in the specified line
number.
• <line number> can also be specified using a label name.
Program Example
10 ' This program specifies the position of data read by the READ instruction, using the RESTORE
instruction
20 RESTORE 200
:
' Reads data in line 200
40 READ A$,B$,C$:PRINT A$,B$,C$
:
' Reads and display the data
60 RESTORE 100
:
' Reads data in line 100
80 READ A$,B$,C$:PRINT A$,B$,C$
:
' Reads and displays the data
90 END
100 DATA Tokyo, Osaka, Nagoya
200 DATA Sapporo, Sendai, Kanazawa
RUN
Sapporo
Sendai
Kanazawa
Tokyo
Osaka
Nagoya
OK
REMARK
See the READ and DATA instructions, and Section 3.5.2.
Содержание 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...