basic.stop
Terminates program.
Syntax
stop stop error.message.number, 'parameter'{, 'parameter' .. }
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.
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.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
