basic.abort Statement/BASIC Program

basic.abort

Command basic.abort Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description immediately stops program execution and unconditionally returns to the TCL command prompt.

The "abort" statement specifies an abnormal end and can appear anywhere in the program. The "error.message#" parameter is the item-id of the desired message in the "dm,messages," file to be output.

The parameters are the values required by the message. If the "string" form is used, the message string is displayed on the screen and placed in the "dm,messages," file.

The "abort" statement is similiar to the "stop" statement, except the "abort" statement also terminates execution of any macro or PROC which might have called the program containing the "abort" statement and aborts the Pick/BASIC program.

The "abort" statement automatically generates error message "[b1] run-time abort at line 'n'".
Syntax abort {message#}{,"parameter"{,"parameter"..}}
abort {error message string}
Options
Example
open "invoices" to invoice.file else abort 201,"invoices"
If "invoices" can not be opened, the program aborts with error 
message 201 and passes in the string "invoices". This causes the 
program to stop with the message '"invoices" is not a file 
name'.  In this case, both [b201] and [b1] error messages are displayed.
Purpose
Related basic.statements
basic.stop
filename.messages
basic.open
ue.3090
basic.end
basic.error
basic.debugger.overview
basic.begin.work