HP RPL example programs from the HP-28S User's Manual. A nice set to study.

To view the code for an entry, tap the 2nd-level key followed by its soft-key.

BOXO: RPL user function; takes 3 real args (length, width, height) and computes the surface area of a box

boxo: RPL program; same as BOXO but not a user function (not using variables, nor an expression), written in RPL (w/ modern-style commands)

BOXV: RPL user function; takes 3 real args (length, width, height) and computes surface area of a box divided by its volume; uses BOXO

FIB2: RPL program; takes 1 integer arg and computes the corresponding Fibonacci number

MULTI: helper program; takes an object and an RPL program and evaluates the program on the object until the object no longer changes; this can be used for evaluation-until-no-change

PAD: Makes an input (any type) into a right-aligned string 23-characters wide with padding (space characters) on the left

∑GET: Computes covariance matrix

∑X2, ∑Y2, ∑XY: Obtain statistical quantities from a matrix previously computed with ∑GET

∑DAT: Example statistical data

∑COV: Covariance matrix; ∑GET will re-create it

SORT: RPL program to sort an input vector

dataToSort: Example vector data to sort

moreDataToSort: Example vector data to sort (more items)

LMED: Helper program ("subroutine", if you will) used by MEDIAN

MEDIAN: Obtains median value of a given vector

larger: Makes sure the two top-most items on the stack appear larger-to-smaller (swaps, if position 1 is smaller than position 2)

larger2: Same as 'larger' but using IFT function with a RPL program as the "then" action

See the attachment for a quick read of these programs on your computer. We recommend you use a JSON editor with this file (and ND1 exchange data in general).

If you want to edit this data on your computer and get it back into ND1, please see http://naivedesign.com/ND1/Custom_Server_Setup.html.