IB Statements/run

From CometWiki

(Difference between revisions)
Jump to: navigation, search
Badge (Talk | contribs)
(New page: '''RUN statement''' '''Syntax:''' RUN program [,DIR=directory] [,EXCP=statement-label] '''Discussion:''' The RUN statement terminates the current program and calls in another progra...)
Newer edit →

Revision as of 11:52, 20 May 2009

RUN statement

Syntax: RUN program [,DIR=directory] [,EXCP=statement-label]

Discussion: The RUN statement terminates the current program and calls in another program to be loaded and executed in the same partition. Because it causes an exit from the current program and transfers control to the called program, RUN is the last statement to be executed.

You cannot return to the original program automatically. It must be recalled by another RUN statement.

Also see ACTIVATE and ENTER.

Example 1: RUN "MAINMENU",DIR="DSK"

In this example, the RUN statement runs a program called MAINMENU, which is located on directory DSK.

Example 2: IF OPTION$="QUIT" THEN RUN "MAINMENU"

In this example, the variable named OPTION$ is tested. If OPTION$ is equal to "QUIT," the MAINMENU program is executed.

Personal tools