Documentation

#ABORT

ABORT

Syntax: #AB all

Aborts further parsing of the current command line. Commands after this on the same line are discarded. Aborts processing of current program block.

If the flag is present and non-zero, all active scripts are aborted instead of just the current program block.

ABORT Examples

cd ..;#ABORT;ls
OK, this is somewhat contrived, but the command cd .. is sent, then the #ABORT stops further processing so that the ls command is ignored.
#IF (@Dir="home") {Command 1;#abort;Command 2};Command 3
Another contrived example. In this one, Command 3 is always executed. If @Dir is home then Command 1 is executed. Command 2 is never executed.
#IF (@Dir="home") {Command 1;#abort all;Command 2};Command 3
Another contrived example. In this one if @Dir is home then Command 1 is executed...both Command 2 and Command 3 are aborted since the flag to #abort is non-zero. Command 3 is executed if @Dir is not home.

Add comment

Login or register to post comments