Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

END-WHILE Terminate WHILE block

&pagelevel(4)&pagelevel

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


0CMD0001No error

1CMD0202Syntax error

1SDP0118Command in false context

1SDP0139Back branch limit reached

1SDP0223Incorrect environment

3CMD2203Incorrect syntax file

32CMD0221System error (internal error)

64SDP0091Semantic error

130SDP0099No further address space available

Example

See the WHILE command, "WHILE Initiate WHILE block ".