Domain: PROCEDURE
Command description
END-FOR terminates a FOR block, i.e. a FOR loop which was initiated with the FOR command.
When the END-FOR command is executed, the loop variable in the FOR command is assigned the next element in the value list. Execution then continues with the first command after the FOR command. Once the value list has been completely processed, the loop is terminated: procedure execution resumes with the command following the END-FOR command. (Full details are contained in section “Defining loops”.)
Format
END-FOR |
BLOCK = *LAST / <structured-name 1..255> |
Operands
BLOCK =
Designates the FOR block to be terminated.
BLOCK = *LAST
Reference to the FOR-BLOCK last opened.
BLOCK = <structured-name 1..255>
Reference to the tag of the FOR block last opened; specifying another block tag produces an error message.
Command return codes
(SC2) | SC1 | Maincode | Meaning |
0 | CMD0001 | No error | |
1 | CMD0202 | Syntax error | |
1 | SDP0118 | Command in false context | |
1 | SDP0139 | ack branch limit reached | |
1 | SDP0223 | Incorrect environment | |
3 | CMD2203 | Incorrect syntax file | |
32 | CMD0221 | System error (internal error) | |
64 | SDP0091 | Semantic error | |
130 | SDP0099 | No further address space available |
Example
See the FOR command, "FOR Initiate FOR block ".