Entering and Executing Programs

A program is an object — it occupies one level on the stack, and you can store it in a variable.

To enter a program:

1.Press @%.The PRG annunciator appears, indicating programentry mode is active.

2.Enter the commands and other objects (with appropriate delimiters) in order for the operations you want the program to execute.

Press # to separate consecutive numbers. Press to move past closing delimiters.

3.Optional: Press (newline) to start a new line in the command line at any time.

4.Press ` to put the program on the stack.

In Programentry mode ( PRG annunciator on), command keys aren’t executed — they’re entered in the command line instead. Only nonprogrammable operations such as ƒand J are executed.

Line breaks are discarded when you press `.

To enter commands and other objects in a program:

Press the keyboard or menu key for the command or object. All commands can also be selected from the list.

This guide assumes that Flag –117 is clear, so that you see menus rather than choose boxes wherever possible. Also RPN mode should be set.

or

Type the characters using the alpha keyboard.

Refer to the calculator’s User’s Guide for how to use the alpha keyboard.

In this guide an abbreviated convention is used whereby invocations of the alpha keyboard are not always shown. In the next example we show:

OVOLK where the alpha “VOL” can be entered as shown: O~~VOL ~K (assuming Flag –60 is clear).

To store or name a program:

1.Enter the program on the stack.

2.Enter the variable name (with ' delimiters) and press K.

You can choose descriptive names for programs. Here are some ideas of what the name can describe: The calculation or action. Examples: SPH (sphericalcap volume), SORTLIST (sort a list).

The input and output. Examples: XFX (x to f (x)), RHV (radiusand height to volume).

The technique. Example: SPHLV (sphericalcap volume using local variables).

To execute a program:

Press J then the menu key for the program name.

or

Enter the program name (with no delimiters) and press `.

or

Put the program name in level 1 and press N.

or

Put the program object in level 1 and press N.

RPL Programming 13

Page 27
Image 27
HP 48gII Graphing Entering and Executing Programs, To enter a program, To enter commands and other objects in a program