Trident Help

RPN Power 48 manual · Chapter 8 of 19

Variables and the VAR menu

Store, recall, evaluate and purge named variables, and use the VAR menu soft keys.

8.1Names#

A name is an object between single quotes, such as 'x'. Names can hold letters and digits and must start with a letter. Press ', lock alpha, type the name, unlock alpha and press ENTER. A name that holds no value stays on the stack as a name; one that holds a value is replaced by the value when evaluated.

Example 8.1

Put a name on the stack

  1. Quote, alpha lock, x, alpha, ENTER.

    'αα◀1/x÷αENTER
Result of the example "Put a name on the stack" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                            'x'.
You should see1: 'x'

8.2Store a value in a variable#

Put the value on level 2 and the name on level 1, then press STO▶. The stack is emptied of both. To get the value back, put the name on the stack and press left shift STO▶ (RCL), or just press the variable's soft key in the VAR menu.

  1. value
  2. ENTER
  3. name in quotes
  4. ENTER
  5. STO▶
Storing a value
Example 8.2

Store 7 in a variable called a

  1. Type 7, enter the name, press STO. Open VAR to see the new variable.

    7'αα◀F1αENTERSTO▶VAR
    After step 1: Type 7, enter the name, press STO. Open VAR to see the new variable. The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: /   a                              .
Result of the example "Store 7 in a variable called a" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: /   a                              .
You should seea
Example 8.3

Recall it with RCL

  1. Store 7 in a.

    7'αα◀F1αENTERSTO▶
  2. Enter the name and press left shift STO (RCL).

    'αα◀F1αENTER◀RCLSTO▶
Result of the example "Recall it with RCL" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                              7 /   a                              .
You should see1: 7
Example 8.4

Recall it with the VAR menu

  1. Store 5 in a, open VAR and press the variable soft key.

    5'αα◀F1αENTERSTO▶VARF1
Result of the example "Recall it with the VAR menu" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                              5 /   a                              .
You should see1: 5
Example 8.5

Use a variable in a calculation

  1. Store 2 in a, then compute a + 5 by evaluating the expression.

    2'αα◀F1αENTERSTO▶'αα◀F1α+5ENTEREVAL
Result of the example "Use a variable in a calculation" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                              7 /   a                              .
You should see1: 7

8.3Use the VAR menu#

VAR lists your variables with the newest first, six at a time. The soft key of a variable runs or recalls it: a number or object is pushed, a program is run, a name is evaluated. Left shift plus the soft key stores level 1 into that variable; right shift plus the soft key recalls the variable.

Example 8.6

Two variables in the menu

  1. Store 7 in a and 8 in b, then open VAR.

    7'αα◀F1αENTERSTO▶8'αα◀F2αENTERSTO▶VAR
Result of the example "Two variables in the menu" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: /   b     a                        .
You should seeb a
Example 8.7

Store into a variable with left shift

  1. Store 5 in a. Put 9 on the stack, then left shift plus the soft key stores it.

    5'αα◀F1αENTERSTO▶9ENTERVAR◀F1VARF1
Result of the example "Store into a variable with left shift" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:                              9 /   a                              .
You should see1: 9

8.4Delete a variable#

Put the name on the stack and press right shift STO▶ (PURGE). The variable is removed.

Example 8.8

Purge a variable

  1. Store 7 in a, then purge it.

    7'αα◀F1αENTERSTO▶'αα◀F1αENTER▶PURGESTO▶
  2. Open the VAR menu: it is empty.

    VAR
Result of the example "Purge a variable" The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1:.
You should see1:
Example 8.9

Recalling a missing variable

  1. Try to recall a name that holds nothing.

    'αα◀ASINSINαENTER◀RCLSTO▶
Result of the example "Recalling a missing variable" The display shows: RAD                      { HOME } / RCL Error: / Undefined Name / 4: / 3: / 2: / 1:                            'q'.
You should seeUndefined Name

8.5The TOOL menu#

TOOL gathers EDIT, VIEW, RCL, STO, PURGE and CLEAR. EDIT and VIEW open level 1 in the command line.

The TOOL menu. The display shows: RAD                      { HOME } / 6: / 5: / 4: / 3: / 2: / 1: /  EDIT VIEW  RCL   STO PURGE CLEAR.
The TOOL menu.

HP 48 and HP 50g is a trademark of HP Inc.. Trident Calculator is an independent product by South View Studios and is not affiliated with, sponsored by or endorsed by HP. The name is used only to describe the kind of calculator this model resembles; Trident's names, keys, display, fonts and software are its own clean-room design.