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-FOR Terminate FOR block

&pagelevel(4)&pagelevel

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


0CMD0001No error

1CMD0202Syntax error

1SDP0118Command in false context

1SDP0139ack branch limit reached

1SDP0223Incorrect environment

3CMD2203Incorrect syntax file

32CMD0221System error (internal error)

64SDP0091Semantic error

130SDP0099No further address space available

Example

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