ABORT

ABORT

Top  Previous  Next

 

The ABORT command terminates all active processing and returns to the command prompt.

 

 

Format

 

ABORT{text}

 

where

 

textis the optional message text to be displayed.

 

 

The ABORT command is intended for use where a paragraph detects an application fault and needs to terminate all active processing. All active commands, sentences, paragraphs, menus, etc are discarded. Unless the command was run using the QMBasic EXECUTE statement with the TRAPPING ABORTS option, just before return to the command prompt, QM checks for an executable item (usually a paragraph) in the VOC named ON.ABORT and, if this is found, runs it.

 

The ON.ABORT paragraph may examine the @ABORT.CODE variable to determine why it was invoked. The ABORT command sets this variable to 1. The text, if present, will be stored in @ABORT.MESSAGE

 

The value of @SYSTEM.RETURN.CODE is not affected by the ABORT command.

 

 

See also:

CLEAR.ABORT, STOP