Program Calling (Public Programs)

While overlaying is one way of breaking down a large program into smaller pieces, PRO/5 provides the ability for one program to CALL another program as though it were calling a subroutine. The program that is called is a public program. A public program does not replace the calling program as would an overlay. Instead, the public program is loaded from disk into memory OUTSIDE the workspace. When the public program is finished executing, PRO/5 returns to the next statement in the calling program and continues executing. The memory used by the public program is released. Public programs save disk space and development time. Any PRO/5 program may be called as a public program, although some verbs may not be executed from a public program. See the CALL, ENTER, and EXIT verbs for more information.