A drawing of the keyboard sits under the navigation bar. Page 1 explains the User RPL language: objects, locals, tests, branching, loops, lists, flags, errors, input/output, menus, debugging — then maps every soft menu, its pages and submenus, and the keys that open them. The following pages index every command in the AUR Command & Function Reference (HP 48gII / 49g+ / 50g) by category and subgroup. Hover any command for its description and type.
Sources: HP 50g Advanced User's Reference Manual, Ed. 2 (HP, 2009) — ch. 1 RPL Programming, ch. 3 Full Command and Function Reference, app. C–E · HP 48SX Programmer's Reference Manual · J. Dossey, Advanced User-RPL Guide. Commands belonging to more than one topic are listed in each.Every key does three things. Its own legend is printed on the key; the function you get after the white left-shift is printed in white above-left, after the orange right-shift in orange above-right, and the yellow letter at the key’s corner is what ALPHA types. Press a shift once and it applies to the next key; the annunciator at the top of the display shows which is armed.
Drawn from the emulator’s key table (x50ng) and the AUR key-code table; the F-key labels Y= WIN GRAPH 2D/3D TBLSET TABLE are the six plot input forms.
| Object inside a program | Action when reached |
|---|---|
| Command / function | Executed |
| Number, string, list, program, algebraic, complex, array | Put on the stack |
Global name, unquoted NAME | Evaluated: program → run; name → evaluated; directory → made current; other → put on stack |
Global name, quoted 'NAME' | Name put on the stack |
| Local name, unquoted | Contents put on stack (not evaluated) |
| Local name, quoted | Name put on the stack |
Comments @ text @ or @ to end of line — stripped when the program is parsed (except inside strings). Line breaks are discarded on ENTER.
Run: VAR-menu key · type name + ENTER · 'NAME' EVAL · program object + EVAL. Stop: CANCEL (ON). Edit: EDIT / EDITB / VISIT / VISITB / Filer. Program-entry mode shows the PRG annunciator; command keys are entered, not executed.
| Syntax | Object | Type |
|---|---|---|
3.14 1.E5 | Real number | 0 |
5 -12 (no point) | Exact integer (CAS) | 28 |
(1,2) '1+2*i' | Complex | 1 |
"text" | String | 2 |
[1 2 3] [[1 2][3 4]] | Real vector / matrix | 3 |
[(1,2) (3,4)] | Complex array | 4 |
{ 1 "a" X } | List | 5 |
'NAME' / 'x' | Global / local name | 6 / 7 |
« … » | Program | 8 |
'X^2+1' 'A=B' | Algebraic (expression / equation) | 9 |
#FFh #10d #17o #101b | Binary integer | 10 |
GROB w h hex… | Graphics object | 11 |
:tag:obj | Tagged object | 12 |
1_m/s 2.5_kg | Unit object | 13 |
DIR … END | Directory | 15 |
[['X' 'Y']] | Symbolic matrix | 29 |
←name | Compiled local name | 7 |
Other TYPE numbers: 14 XLIB name · 16 library · 17 backup · 18 built-in function · 19 built-in command · 20 system binary · 21/22 extended real/complex · 23 linked array · 24 character · 25 code · 26 library data · 27 mini font · 30 font · 31 extended object. VTYPE returns −1 if the variable does not exist.
EVAL if it holds a program or algebraic.←y: visible to any program called within the structure; disappear when the structure ends. « → ←y 'IFTE(←y<0,BELOW,ABOVE)' »'c' INCR / 'c' DECR work on local or global counters. FOR/STEP counters are locals.LOCAL / UNBIND — algebraic-mode equivalents.A program that is solely a → structure with an algebraic body is a UDF: usable in algebraics, takes symbolic arguments, has a derivative. With a program body it still works from stack or algebraic syntax but has no derivative and must return exactly one result. DEFINE 'HYP(x,y)=SQRT(x^2+y^2)' builds the same thing.
| Test | Meaning | Notes |
|---|---|---|
== ≠ | Equal / not equal | Names & algebraics give an expression 'X<5' → use →NUM or a conditional (auto-evaluated) |
< > ≤ ≥ | Order | Strings compare alphabetically; lists/programs equal if contents identical |
SAME | Identical objects | No numeric evaluation; binary integers must match wordsize; else like == |
= | Builds an equation | Not a test |
AND OR XOR NOT | Logic | Any nonzero = true; infix in algebraics: 'A<B AND C', prefix 'NOT Z≥4' |
TYPE VTYPE LININ | Structure tests | DUP TYPE 3 == · 'NAMES' VTYPE -1 == (missing) · 'H+Y^2' 'H' LININ |
FS? FC? FS?C FC?C | Flag tests | ?C variants clear the flag after testing |
The test-clause is a command sequence (leaves 1/0 on the stack) or an algebraic (auto-evaluated — no →NUM needed). THEN removes the test result. CASE runs the first true clause then skips to the final END; the default clause is optional. IFT/IFTE take objects (usually programs) as clauses; IFTE is also an algebraic function.
'c' INCR / 'c' DECR change the variable and return the new value.'Σ(j=1,n,j^2)', SEQ, list ops (ΣLIST, DOLIST, MAP).Parallel processing: most one- and two-argument functions applied to a list act element-wise: {1 2 3} SQ → {1 4 9}, {1 2 3} 2 * → {2 4 6}, {1 2} {3 4} ADD → {4 6}. n may be omitted in DOLIST/DOSUBS when prog is a single command or a UDF-shaped program. NSUB/ENDSUB error outside DOSUBS.
| Flag | Set means |
|---|---|
| −1 | Principal solution only |
| −2 | Symbolic constants (π e i MAXR MINR) evaluate to numbers |
| −3 | Numerical results (functions of symbolics → numbers) |
| −17/−18 | Angle mode: RAD −17 set · DEG both clear · GRAD −18 set |
| −19 | →V2 makes a complex instead of a vector |
| −20 −21 −22 | Underflow / overflow error · infinite result → MAXR (set) |
| −40 −41 −42 | Clock shown · 24-h · date DD.MM |
| −51 | Fraction mark is comma |
| −55 | Last Arguments disabled |
| −56 −57 | Error beep / alarm beep disabled |
| −60 −61 −62 | Alpha lock · user-mode lock · user mode on |
| −63 | Vectored ENTER (αENTER / βENTER) |
| −64 | GETI/PUTI wrapped to first element |
| −95 | Algebraic entry mode (clear = RPN) |
| −103 −105 | Complex mode · Approximate mode |
| −117 | Soft-key menus (clear = choose boxes) |
| −128 | All variables real (default); clear allows complex |
Default state is clear except −17, −27, −34, −90, −95, −128 and wordsize/base flags −5…−12. Save/restore around a program: RCLF → f « … f STOF » or PUSH/POP.
An error inside the trap-clause abandons the rest of that clause and jumps to the error-clause; execution then continues after END. Untrapped errors abort the program and show the message (arguments restored if Last Arguments is enabled). Built-in error numbers: Appendix A of the AUR.
| INPUT option | Meaning |
|---|---|
"cmdline" | Initial command-line text (embedded newlines → multiple rows). Patterns: ":a: :b:" tags, "@comment@", blanks to fill in. |
n / {row col} | Cursor position; 0 = end of line; negative = replace cursor (else insert) |
ALG | Algebraic/Program-entry mode |
α | Alpha lock on |
V | Verify result is valid object(s); re-prompt on Invalid Syntax |
INFORM field = "Label" or { "Label" "help text" type₁ type₂ … }; { } spans a column. Format col or { col tabs } (defaults 1, 3). Use NOVAL as a place-holder in resets/inits; empty fields return NOVAL. CHOOSE item = obj or { "shown" result }; npos 0 = view only. Both return 0 on CANCEL.
Displays made with DISP vanish when the program ends or halts unless FREEZE is used. « … "DONE" 1 DISP 1 FREEZE » is the usual closing idiom.
Menus set by a program appear only when it halts or ends — use -1 WAIT to show the menu while paused. Menu items may be "label", name, or { "label" action }. Example: 65 MENU "Select Angle Mode" PROMPT.
Key codes rc.pf: row r (1–9), column c (1–6), plane p: 0/1 plain · 2 · 3 · 4 alpha · 5 alpha-left · 6 alpha-right; f = 1 for shift-and-hold. User assignments act in USER / 1-USER mode (flags −61/−62). WAIT returns rc.p; KEY returns rc only.
Every built-in menu — its number, pages, submenus and return keys — is drawn in the Soft Menus section after the guide; the keyboard itself is at the top of the page.
| Reserved variable | Holds |
|---|---|
| EQ · ΣDAT · ΣPAR | Current equation · statistics matrix · stat parameters |
| PPAR · VPAR · ZPAR · TPAR | Plot · 3D view · zoom · table parameters |
| CST · IOPAR · PRTPAR · ALRMDAT | Custom menu · I/O · printer · alarm data |
| Mpar · MHpar · PTPAR | Multiple-equation solver · periodic table |
| STARTUP · STARTOFF · STARTERR | Programs run at power-on · power-off · on error |
| αENTER · βENTER | Vectored ENTER hooks (flag −63) |
| TOFF · EXPR · EXITED | Auto-off timeout · EQW expression · exit state |
| CASDIR: VX MODULO EPS REALASSUME PERIOD PRIMIT CASINFO | CAS variable, modulus, epsilon, assumptions… |
| # | Highest → lowest |
|---|---|
| 1 | Unit attachment _ (inside: parentheses, ^ bottom-up, * /) |
| 2 | Parenthesized expressions, innermost first |
| 3 | Functions with arguments (SIN, LOG, …) |
| 4 | Factorial ! |
| 5 | Power ^ (right-assoc: 2^2^3 = 2^(2^3)), √, XROOT |
| 6 | Negation, * /, MOD |
| 7 | + − |
| 8 | == ≠ < > ≤ ≥ |
| 9 | AND, NOT |
| 10 | OR, XOR |
| 11 | Left argument of | (where) |
| 12 | = |
Same-precedence operators evaluate left to right. Stack syntax vs algebraic syntax: « SQ SWAP SQ + √ » ≡ « → x y 'SQRT(x^2+y^2)' ».
Everything on this sheet is User RPL — the checked, documented language. Underneath it sits System RPL: the language the ROM itself is written in. Same interpreter, no safety net — entries are called by ROM address, arguments are never checked, counts are 20-bit bints instead of reals — and a typical program runs 3–10× faster. The 50g ships the toolchain: 256 ATTACH wakes the Development Library, MASD (library 257) compiles source with ASM, and the extable library from hpcalc.org gives every entry its name. A wrong word ends in “Try To Recover Memory?” — back up first.
→ The HP 50g System RPL sheet — a programmer’s guide (source format, dispatch, locals, loops, errors) and all 3,260 supported entries with addresses and stack diagrams, from Programming in System RPL (Kalinowski & Dominik, 2nd ed.).
All 127 units the 50g knows, from Appendix B of the AUR. Values are exact as printed by HP. Temperature units carry both a scale factor and an offset, which is why °C and °F show two figures — CONVERT handles the offset, but arithmetic on a bare °C value does not.
A soft menu is the row of six labels across the bottom of the display; F1–F6 press them. A menu with more than six entries has pages: NXT steps forward (and wraps from the last page to the first), NXT (PREV) steps back. Labels ending in a submenu open a deeper menu; the last page of every MTH and PRG submenu ends with a key named for its parent (MTH, PRG, LIST, BRCH…) that takes you back up — the dashed amber lines in the trees. A dotted rule inside a card is a page break: press NXT. Two more ways up: press the parent’s key again (SYMB for MTH), or hold and press NXT for LAST MENU (menu 0). MODE (CUSTOM) and VAR are the two menus you fill yourself.
Flag −117 must be set (MODE → FLAGS → 117 “Soft MENU”, or -117 SF). Out of the box it is clear and the very same keys open a choose box instead: a numbered list where MTH 3 = LIST, PRG 6 = LIST, and so on — the numbers in the trees are those item numbers (F1 = 1 … F6 = 6, next page continues 7…). Either way the menu numbers work from a program: 11 MENU shows MTH LIST, 34 TMENU shows PRG LIST temporarily, 0 MENU restores the last menu.
Menu labels on the calculator are cut to five characters (REVLI, DOLIS, ENDSU…); the trees spell the full command so you can find it in the index below.
is the white left-shift key, the orange right-shift key — drawn as on the keyboard. Underlined blue opens a soft menu, violet a choose box or form. Rows 5–6 and 10 carry no menus and are left out.
Number after the name = argument for MENU / TMENU. ⏎ = next page (NXT). Sources: HP 50g AUR appendices G (keyboard shortcuts), H (menu-number table), I (command menu paths); menu contents checked on ROM 2.15.