basic.stop Statement/BASIC Program

basic.stop

Command basic.stop Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description stops program execution and returns to the invoking the process.

The parameter{s} are passed to the error message handler and the message stored in "error.message.number" is displayed.

The "stop" statement is similiar to the "abort" statement, except the "stop" statement terminates execution of the program without going into the Pick/BASIC debugger. Control returns to the calling program, PROC, or Macro.
Syntax stop
stop error.message.number, "parameter"{, "parameter" .. }
Options
Example
>open "invoices" to inv.file else stop 201,"invoices"

The "stop" statement above stops program execution if 
"invoices" can not be opened, and prints the designated error message 
with a passed variable parameter. If the "invoices" file does not 
exist, the following message displays:

[201] 'invoices' is not a file name

read cust.item from cust.file,id else stop 202,id 

If the item referenced by the variable "id" is not on file, the 
program stops and displays the following:

[202] 'id' not on file.

The actual item-id is displayed in the error message.
Purpose
Related basic.statements
basic.abort
filename.messages
basic.open
basic.end
basic.error
basic.begin.work