STOP, STOPE, STOPM |
![]() ![]() ![]() |
The STOP statement terminates the current program. STOPE and STOPM provide compatibility with other multivalue database products.
Format
STOP {print.list}
where
Control is passed to the calling program, menu or paragraph.
The Pick syntax of STOP can be enabled by including a line $MODE PICK.ERRMSG in the program before the first STOP statement. In this syntax, the STOP statement becomes
STOP {msg.id {, arg...}}
where
See the ERRMSG statement for a description of the ERRMSG file message format.
The STOPE statement always uses Pick style message handling and the STOPM statement always uses Information style message handling, regardless of the setting of the PICK.ERRMSG option.
Examples
IF NO.OF.ENTRIES = 0 THEN STOP
This statement terminates the program if the value of the variable NO.OF.ENTRIES is zero. No error message is printed. STOP statements without error text messages can result in difficult diagnostic work to locate faults.
OPEN "STOCK.FILE" TO STOCK ELSE STOP "Cannot open STOCK.FILE - Error " : STATUS() END
This program fragment attempts to open a file named STOCK.FILE. If the open fails, the program displays an error message and terminates the program.
See also: |