Unconditionally branches control from within a FOR, FOREACH , REPEAT or DO WHILE statement to the statement immediately following the corresponding ENDDO or NEXT statement.
EXIT
The EXIT statement is only valid within a DO WHILE, FOR ... NEXT, FOREACH .. NEXT or REPEAT .. UNTIL construct. An EXIT statement outside of either construct will raise a compile time error.