Trident HelpOpen the calculator

Programming

Named programs with variables

Write a program with a text name and a variable, store a value and run it.

Open in Trident

The RPN Advanced 42 lets you give programs readable names, and use named variables instead of just the stack. Letters are typed in ALPHA mode: you press a group key (like F-I) and then a letter inside it.

We build FX: it reads a variable X, squares it and subtracts 2. The MVAR line marks X as an input, which also lets the solver use the program.

RPN Advanced 42

Start on the main screen: Press EXIT (once or twice) to close any menu and return to the plain stack view of Y and X.

  1. Press shift, then R/S (PRGM) to start recording.

    ⇧PRGMR/S
  2. Add the label: PGM.FCN (shift, 3), pick LBL, then type the name FX. Each letter is two presses (its group, then the letter). Press ENTER to finish.

    ⇧PGM.FCN3Σ+⇧ALPHAENTER1/xΣ+XEQ1/xENTER
  3. Declare the input: PGM.FCN, press down twice for the second page, pick MVAR, and type X.

    ⇧PGM.FCN3▼▼Σ+XEQ1/xENTER
  4. Recall X and calculate: RCL, name X, then shift and the x² key, then 2 and minus.

    RCL⇧ALPHAENTERXEQ1/xENTER⇧x²√x2−
  5. End with RTN (PGM.FCN, second menu key), then leave program mode.

    ⇧PGM.FCN31/x⇧PRGMR/SEXITEXIT
  6. Store 3 in X, then run the program from the XEQ label menu with the first menu key.

    3STO⇧ALPHAENTERXEQ1/xENTERXEQΣ+

You should see3 squared minus 2 is 7.

RPN Advanced 42 key reference

Tips

Related guides