EXIT
Syntax: #EXIT
Related: #CONTINUE, #BREAK, #ABORT
Exits the current script, returning to whatever script it was called from. If you also want to exit from the calling script, use the #ABORT all command.
EXIT Example
#LOOP 10 {#IF (%i = 5) {#EXIT};#SHOW %i};#SHOW after
Displays 1,2,3,4. When the loop gets to number 5, the #EXIT command exits the script, in this case everything in the command line.
#ALIAS example {#LOOP 10 {#IF (%i = 5) {#EXIT};#SHOW %i}}
Then as a second command line entry.
example;#SHOW after
Displays 1,2,3,4,after. When the loop gets to number 5, the #EXIT command exits the script, in this case the alias example gets exitted. |