ABORT


The ABORT statement terminates the program running as well as the program that called it.

 

COMMAND SYNTAX

ABORT {message.number{, expression ...}}

 

SYNTAX ELEMENTS

The optional message.number provided with the statement must be a numeric value, which corresponds to a record key in the jBASE error message file.

A single expression or a list of expression(s) may follow the message.number. Where more than one expression is listed, they must be delimited by use of the comma character. The expression(s) correspond to the parameters that need to be passed to the error file record to print it.

The optional message.number and expression(s) given with the command are parameters or resultants provided as variables, literal strings, expressions, or functions.

 

NOTES

This statement is used to terminate the execution of a jBC program together with any calling program. It will then optionally display a message, and return to the shell prompt.

The optional message displayed on terminating the program is held in the error file. For successful printing of the message, parameters such as linefeeds, clearscreen, date and literal strings may also be required.

Operation of this command can be altered by setting the Command Level Restart option - see the Systems Housekeeping chapter of the System Administrator"s Reference Manual for more details.

 

EXAMPLE

CRT "CONTINUE (Y/N) ?":; INPUT ANS
IF ANS NE "Y" THEN ABORT 66, "Aborted"

This will terminate the program and print error message 66 passing to it the string "Aborted", which will be printed as part of error message 66.


jBC