Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

ABORT

Description 

The ABORT statement terminates the current running program and the program that called it. It takes the general form: 

ABORT {message.number{, expression ...}}
  • 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.  The optional message.number and expression(s) given with the command are parameters or resultants provided as variables, literal strings, expressions, or functions.
  • 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 the use of the comma character. The expression(s)correspond to the parameters that need passing to the error file record to print it.

Note: 

This statement will terminate the execution of a jBASE BASIC program together with any calling program. It will then optionally display a message, and return to the shell prompt. The error file holds the optional message displayed on terminating the program. 

For successful printing of the message, parameters such as linefeeds, clearscreen, date and literal strings may also be required. Setting the Command Level Restart option can alter operation of this command.

An example of use may be as: 

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

This will terminate the program and print error message 66.


Go back to jBASE BASIC.

Was this article helpful?