PRGM EXEC Instructions

Calling Other Programs as Subroutines

On the TI CE family of graphing calcualtors, any stored program can be called from another program as a subroutine. Enter the name of the program to use as a subroutine on a line by itself.

Calling a Program from Another Program

You can enter a program name on a command line in either of two ways.

Press ¼ | to display the PRGM EXEC menu and select the name of the program prgmname is pasted to the current cursor location on a command line.
Select prgm from the PRGM CTL menu, and then enter the program name.

prgmname

When prgmname is encountered during execution, the next command that the program executes is the first command in the second program. It returns to the subsequent command in the first program when it encounters either Return or the implied Return at the end of the second program.

Program

 

Output

 

Subroutine ( '

Notes about Calling Programs

Variables are global.

label used with Goto and Lbl is local to the program where it is located. label in one program is not recognized by another program. You cannot use Goto to branch to a label in another program.

Return exits a subroutine and returns to the calling program, even if it is encountered within nested loops.