
2-4
2.1.3 Program Recursive Call
When a program is called, the calling program itself can be designated as a
program name using a CALL statement. This is referred to as a recursive call.
Program PRO1
Program MOTION
Calls itsel
again
Fig. 2-4 Program Recursive Calling Diagram
Note: The variables in a PAC program are stored in the static memory
of each program; therefore, pay attention to has to use
variables when a recursive call is used. If the initial value is set
using a local variable the value returns to its initial value every
time the program is called.
Kommentare zu diesen Handbüchern