11 - 361 11 - 361
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
RENUM
Instruction
RENUMber
• Reassigns line numbers of a program.
RENUM [<new start line number>][,[<old start line number>][,<increment>]]
new start line number
• • • •
Specify the starting number for the line numbers to
be assigned anew.
old start line number
• • • •
Specify the line number of the current program
where the new line numbering starts.
Syntax
increment
• • • •
Specify the increment per one line in the new line
numbering.
Examples
RENUM 500,100, 5
• • • •
Reassigns line numbers anew from the current line
100, starting from line 500 in increments of 5.
Description
• The RENUM instruction reassigns the line numbers of a program.
• Specify values from 1 to 65529 for <new start line number> and <old start line number>.
• If <new start line number> is omitted, it is assumed that 10 is specified.
• If <old start line number> is omitted, line numbers are reassigned from the start line of the
current program.
• <increment> is the value increased per one line in the new line numbering. If it is omitted, it
is assumed that 10 is specified.
• The RENUM instruction changes the line numbers used in each of instructions such as
GOTO, GOSUB, IF-THEN, IF-GOTO, ON-GOTO and ON-GOSUB, as well as instructions
for evaluating conditions using the ERL function and the RESTORE and RESUME
instructions. They are changed in accordance with the new line numbering.
However, line numbers specified by the CHAIN instruction are not changed.
The error message “Undefined line xxxxx in yyyyy” is displayed if line numbers do not
exist in these instructions.
In the error message, xxxxx indicates the line number that did not exist and yyyyy
indicates the new line number.
In this case, the non-existent line numbers remain as they are.
It is not possible to change the order of program lines using the RENUM instruction
(for example, if 10, 20 and 30 are assigned to a program as line numbers,
RENUM 15,30 cannot be specified).
(Incorrect) Program
10
20
30
(Correct) Program
10
20
30
Moreover, line numbers greater than 65529 cannot be generated. If such a specification is made,
an "Illegal function call" error occurs.
RENUM 15,30
RENUM 30,10
30
40
50
Program
Содержание 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...