Flow of Program Execution Flow of Program Execution Program instructions are normally executed sequentially from the beginning of a program to its end. This sequential flow may be changed when a GOTO or IF...GOTO instruction, or a control structure, is encountered. The CALLinstruction causes another program to be executed, but it does not change the sequential flow through the calling program because execution of the calling program resumes where it left off when a RETURN instruction is executed by the CALLed program. The WAIT instruction suspends execution of the current program until a condition is satisfied.
The WAIT.EVENT instruction suspends execution of the current program until a specified event occurs or until a specified time elapses. The PAUSE and HALT instructions both terminate execution of the current program. After a PAUSE, program execution can be resumed with a PROCEED monitor command (see the eV+ Operating System Reference Guide for information on monitor commands). Execution cannot be resumed after a HALT. The STOP instruction may or may not terminate program execution. If there are more program execution cycles to perform, the STOP instruction causes the main program to be restarted at its first step (even if the STOP instruction occurs in a subroutine).
If no execution loops remain, STOP terminates the current program. For more details on these instructions, see Program Interrupt Instructions on page 62. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 27