Here is every function that comes with TouchRPN, along with a quick description of what it does:
| ! | Stores value at Y to variable at X. |
| " | String creation operator, pushes string until terminated by '"' token. |
| ( | Start comment, terminate with ')' |
| * | Multiply X by Y |
| + | Add X to Y |
| - | Subtract X from Y. |
| -roll | Opposite of roll |
| -rot | Rotate X,Y,Z to Y,Z,X |
| / | Divide Y by X |
| 2dup | Duplicates X and Y (X,Y -> X,Y,X,Y |
| : | Starts word (function) definition. Follow with name of word, body of word, and end with ';' |
| ; | defines end of word |
| < | Pushes true if Y < X, else false |
| = | Pushes true if X=Y |
| > | Pushes true if Y > X, else false |
| @ | Pushes value of variable at X. |
| [ | Unit definition startclose with ']' alone. |
| acos | inverse cosine |
| acosh | inverse hyperbolic cosine |
| again | Branches back to begin, infinite loop. |
| alloc | Allocates Obj-C object specified by the next token (ex'alloc NSString') |
| and | Binary and logical 'and' (bitwise if both are integers). |
| asin | inverse sine |
| asinh | inverse hyperbolic sine |
| atan | inverse tangent |
| atanh | inverse hyperbolic tangent |
| baseunit | Represents X in basic units |
| begin | Defines beginning of while loop. |
| cconj | Take complex conjugate of X (2+3i -> 2-3i). |
| ceil | Pushes lowest integer greater than X |
| class | Pushes class specified by the next token (ex'class NSString') |
| clr | Clear entire stack |
| constant | Stores X as a constant named by the next token. Constants can be pushed by calling their names (ex. '3.14 constant pi'). |
| cos | cosine |
| cosh | hyperbolic cosine |
| cvar | Creates variable and pushes it onto the stack. |
| debug | Prints stack to stdout |
| depth | Pushes stack depth |
| desc | Pushes description of object in X |
| dig | sets number of digits to be displayed by real numbers |
| doc | Push documentation of next token onto stack. (ex. 'doc doc') |
| drop | Deletes X |
| dup | Duplicates X |
| e | Pushes the numerical constant 'e' |
| else | Defines second block to be evalued if X evaluates to False. |
| eng | Sets real numbers to be displayed in engineering mode |
| exp | Exponentiate X (push e^X). |
| fix | Sets real numbers to be displayed in fixed digits |
| floor | Pushes highest integer less than X |
| get | Pushes value of key (specified by next token) of object in X |
| if | Conditional. If X evaluates to True, execute block (terminated by else or then), otherwise, execute block between else and then. |
| im | pops Y, pushes imaginary component of X |
| in | Converts Y to units in X |
| inSI | Converts X to SI |
| init | Initializes object at X. Shorthand for 'ocm init' |
| inv | Invert X (push 1/X). |
| ln | Take logarithm of X (push ln(X)) |
| ltsep | Set the separator for thousandths to the string in the X register, the separator to the left (lt) of the decimal pt. |
| mag | pops X, pushes magnitude of X |
| mod | Pushes lowest integer greater than X |
| neg | Negate X (push -X) |
| nip | Deletes Y |
| nostrip | Don't strip trailing zeroes off of real numbers |
| not | Binary and logical 'not' (bitwise if an integer). |
| ocm | Sends a message specified by the next token to object on stack. Arguments are taken from stack, so for N arguments, the target must be at N+1. (ex'alloc NSNumber 4 ocm initWithInt:') |
| or | Binary and logical 'or' (bitwise if both are integers). |
| over | Pushes Y, so X,Y -> Y,X,Y |
| pi | Push pi onto stack (~100 digits are stored). |
| pick | Grabs the Xth element int the stack (X=ERROR,Y=0,Z=1,etc..) |
| pow | Take Y to power of X. |
| re | pops X, pushes real component of X |
| repeat | Branches back to 'begin', looping a begin...while...repeat loop. |
| roll | Rolls top X+1 elements (brings element X to front) |
| rot | Rotate X,Y,Z to Z,X,Y |
| round | Pushes nearest integer to X |
| rtsep | Sets the thousands separator to the string in the X register, the separator to the right (rt) of the decimal pt. |
| sci | Sets real numbers to be displayed in scientific mode |
| set | Sets value of key (next token) in object Y to value at X. Keeps Y on stack. |
| short | Sets real numbers to be displayed in shortest mode |
| simpunit | Attempts to simplify units of X |
| sin | sine |
| sinh | hyperbolic sine |
| splituni | Splits number from units (number->Y, units->X) |
| sqrt | Takes square root of X register |
| strcat | Concatinates string in X, with string in Y |
| strip | Strip trailing zeroes off of real numbers |
| strpopb | Takes last letter of string in X and pushes it onto stack |
| strpopf | Removes first character in string at X and pushes it onto stack. |
| strpushb | Adds character at X to end of string in Y. |
| strpushf | Pushes character at X onto front of string in Y. |
| strsplit | Splits string in Y by looking for instances of string in X |
| swap | Swaps X and Y |
| tan | tangent |
| tanh | hyperbolic tangent |
| then | Closes if statement. |
| trunc | Pushes greatest integer between zero and X |
| tuck | Duplicates X, but in Z (X,Y -> X,Y,X) |
| undo | Undo last operation |
| until | Pops X register, if true, branches back to 'begin'. |
| variable | Create named variable, (short for 'cvar constant'). |
| vocab{ | Pushes new vocabulary onto vocab stack, named by string at X |
| while | Pops X, if true, continues on to 'repeat', if false, skips to after 'repeat'. |
| }vocab | Pops top off of vocab stack |