STOP
|
This document covers the following topics:
The STOP
statement is used to terminate the execution of a
program and return to the command input prompt.
One or more STOP
statements may be inserted anywhere within
a Natural program.
The STOP
statement will terminate the execution of the
program immediately. Independent of the positioning of a STOP
statement in a subroutine, any end-page condition specified in the main program
will be invoked for final end-page processing during execution of the
STOP
statement.
The STOP
statement behaves in the same way as the
ESCAPE
ROUTINE
statement during method execution. Method execution
is terminated immediately without producing any return vale.
For Natural Remote Procedure Call (RPC): See Notes on Natural Statements on the Server in the Natural Remote Procedure Call (RPC) documentation.
Note:
The use of the STOP
statement is discouraged
within dialog-based applications. For more information,
see Using the
TERMINATE or STOP Statements Within Dialog-based
Applications in the Programming
Guide.
** Example 'STPEX1': STOP ************************************************************************ DEFINE DATA LOCAL 1 #CODE (A1) END-DEFINE * INPUT // 10X 'PLEASE SELECT COMMAND' // 10X 'LIST VIEW (V)' / 10X 'LIST PROGRAM * (P)' / 10X 'TECH INFO (T)' / 10X 'STOP (.)' // 20X 'CODE:' #CODE * * DECIDE ON FIRST #CODE VALUE 'V' STACK TOP DATA 'VIEW' STACK TOP COMMAND 'LIST' VALUE 'P' STACK TOP COMMAND 'LIST PROGRAM *' VALUE 'T' STACK TOP COMMAND 'LAST *' STACK TOP COMMAND 'TECH' STACK TOP COMMAND 'SYSPROD' VALUE '.' STOP NONE REINPUT 'PLEASE ENTER VALID CODE' END-DECIDE * * END
PLEASE SELECT COMMAND LIST VIEW (V) LIST PROGRAM * (P) TECH INFO (T) STOP (.) CODE: