Domain: PROCEDURE
Command description
END-WHILE terminates a WHILE block, i.e. a loop which was initiated with the WHILE command.
The loop condition in the WHILE command is checked during execution of the END-WHILE command. If the condition is met (TRUE), the first command in the WHILE block is used to start the next loop pass. Otherwise, the loop is terminated. Procedure execution resumes with the first command following END-WHILE (for further details see “WHILE block” (Defining loops )).
Format
END-WHILE |
BLOCK = *LAST / <structured-name 1..255> |
Operands
BLOCK =
Designates the WHILE block to be terminated.
BLOCK = *LAST
Reference to the WHILE block last opened.
BLOCK = <structured-name 1..255>
Reference to the tag in the WHILE 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 | Back 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 WHILE command, "WHILE Initiate WHILE block ".