TI-84 Plus CE Graphing Calculator For Dummies, 3rd Edition
Book image
Explore Book Buy On Amazon

It’s quite easy to have a program call and execute another program saved on your TI-84 Plus calculator, and then return to the original program to complete its execution of that program. One command accomplishes the processes of calling, executing, and returning: the prgm command (accessed by pressing [PRGM][ALPHA][x–1]).

The name of the program being called is placed directly after the command, as shown in the two screens here. Notice that there is no space between the command prgm and the name of the program.

image0.jpg

After the externally called program is executed, the calling program continues to execute the commands that follow the prgm command provided that the externally called program does not encounter the Stop command. This command terminates both the called and calling programs.

As an example, if the program GOTOSTOP in the second screen here is called by your program, then when the program user enters a number greater than or equal to 1,000, both the calling and called programs terminate.

image1.jpg

If you want the externally called program to return control to the calling program before it completes its execution, you do so by putting the Return command in the appropriate place in the externally called program.

As an example, consider the program GOTORTRN appearing here. GOTORTRN is simply the program GOTOSTOP with the Stop command replace by the Return command. If your program calls GOTORTRN, then when the program user enters a number greater than or equal to 1,000, the GOTORTRN program is terminated and the calling program continues to execute.

image2.jpg

If a program containing a Stop command is called by another program, that command may terminate the execution of both programs. If the Stop commands in the called program are replaced with the Return command, then after the called program is executed, program control returns to the calling program.

About This Article

This article is from the book:

About the book author:

Jeff McCalla is a mathematics teacher at St. Mary's Episcopal School in Memphis, TN. He cofounded the TI-Nspire SuperUser group, and received the Presidential Award for Excellence in Science & Mathematics Teaching.

C.C. Edwards is an educator who has presented numerous workshops on using TI calculators.

This article can be found in the category: