IB Statements/stop

From CometWiki

< IB Statements(Difference between revisions)
Jump to: navigation, search
Badge (Talk | contribs)
(New page: '''STOP statement''' '''Syntax:''' STOP '''Discussion:''' The STOP statement terminates a program and runs the QMONITOR program. There can be more than one STOP statement in a prog...)

Latest revision as of 12:04, 20 May 2009

STOP statement

Syntax: STOP

Discussion: The STOP statement terminates a program and runs the QMONITOR program. There can be more than one STOP statement in a program.

Application note: The most common way to terminate a program is to run another program, such as a menu program, via the RUN statement.

The STOP statement is a runtime statement, as opposed to the END statement which is a compile-time statement indicating the physical end of the source program.

Example:

 READ (1,400) EXCP=1000
 .
 .
 .
 1000    IF EXCP NE 33 STOP

In this example, the STOP statement is used in the exception routine at statement-label 1000. In this case, if the system variable EXCP does not equal 33 (which indicates that a record is extracted by another user), the program will stop executing.

Personal tools