Skip to main content

10.4.2.12. EXIT

10.4.2.12. EXIT

 

Explanation

If it is to be used within the FOR ~ NEXT block, stop the FOR repetition and branch into the next statement of NEXT

 

If it is to be used within the SELECT ~ CASE ~ END_SELECT block, stop processing the SELECT statement and branch into the next statement of END_SELECT.

Grammar

EXIT <Kinds of statements>

Parameter

Kinds of statement

FOR : Stop the FOR statement repetition

SELECT : Stop the SELECT statement branching

Example

FOR V1%=1 TO 50

V20%=V20%-V25%

IF V20%<=0 THEN

EXIT FOR 'Stop processing the FOR statement block and branch into the next step of NEXT

ENDIF

NEXT

MOVE P,S=50%,A=0,T=0