The program remains halted until it’s resumed by a CONT command, such as by pressing . If you create a custom menu for input, you can include a CONT command to automatically resume the program when you press the menu key.

Example: The following program activates page 1 of the MODES ANGL menu and prompts you to set the angle mode. After you press the menu key, you have to press to resume execution.

« 65 MENU "Select Angle Mode" PROMPT »

Example: The PIE program on page 2-34 assigns the CONT command to one key in a temporary menu.

Example: The MNX program on page 2-16 sets up a temporary menu that includes a program containing CONT to resume execution automatically.

Using Menus to Run Programs

You can use a custom menu to run other programs. That menu can serve as the main interface for an application (a collection of programs).

To create a menu-based application:

1.Create a custom menu list for the application that specifies programs as menu objects.

2.Optional: Create a main program that sets up the application menu — either as the CST menu or as a temporary menu.

Example: The following program, WGT, calculates the mass of an object in either English or SI units given the weight. WGT displays a temporary custom menu, from which you run the appropriate program. Each program prompts you to enter the weight in the desired unit system, then calculates the mass. The menu remains active until you select a new menu, so you can do as many calculations as you want. Enter the following list and store it in LST:

{

{"ENGL" « "ENTER Wt in POUNDS" PROMPT 32.2 / » }

{"SI" « "ENTER Wt in NEWTONS" PROMPT 9.81 / » }

}

OLST

Program:

Comments:

 

 

« LST TMENU »

Displays the custom menu

 

stored in LST.

 

 

`OWGT

Stores the program in WGT.

 

 

 

Use WGT to calculate the mass of an object of weight 1.25 N. The program sets up the menu, then completes execution.

J%WGT%

Select the SI unit system, which starts the program in the menu list.

%SI%

Key in the weight, then resume the program.

RPL Programming 1-53