PreviousNext
Help > PROGRAM CONTROL STRUCTURES > Exit and Repeat
Exit and Repeat

There are two types of exit in Rittle – exit from function and exit from loop.

exitfunc” allows an early exit from function. It can be anywhere in the function’s body and in as many places as needed.

end” similar to “exitfunc” but used only in the main program body outside of any function. Forces the program to finish execution.

The command “end” cannot be used within a function and will generate an error during compilation. Only the main program can end itself.

exitloop” offers an early exit from a while…until loop structure.

repeat” in a while…until loop structure, forces an early return to the opening “while” without having reached the corresponding “until”.