💾 Archived View for rawtext.club › ~sloum › tally › guide › 05-operator-reference.gmi captured on 2022-03-01 at 15:32:40. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-05)
-=-=-=-=-=-=-
+---+---+---+---+---+ | t | a | l | l | y | +---+---+---+---+---+
This document is a reference of the available operators/functions tally offers. Descriptions are given in format that shows the relevant portions of the stack:
( n1 n2 -- sum )
The parenthesis indicate the beginning and ending of the function description. In the above example `n1` and `n2` both represent numbers on the stack, this `n`. `n2` is the top value on the stack, `n1` is below it. The `--` separates the state from before the function is applied and the stack state after the function is applied. In the above example we are left with `sum` on the stack (the above example is for addition).
Note that in this form of notation there could still be any number of values on either side of the `--`. The description only shows the values modified by the function in question.
( n1 n2 -- sum )
Adds `n2` to `n1`.
( n1 n2 -- n )
Subtracts `n2` from `n1`.
( n1 n2 -- n )
Multiplies `n1` by `n2`.
( n1 n2 -- n )
Divides `n1` by `n2`.
( n1 n2 -- n )
Raises `n1` to the power of `n2`.
( n1 places -- n )
Rounds `n1` to a number of decimal places equal to `places`.
( n1 n2 -- n )
Finds the larger/higher number, of `n1` and `n2`.
( n1 n2 -- n )
Finds the smaller/lower number, of `n1` and `n2`.
( n1 -- n )
Floors `n1` (removes all decimal values).
( n1 -- n )
Ceilings `n1` (rounds up to the nearest whole number).
( -- )
Adds an ascii space character to the string buffer. Has no effect on the number stack.
( n -- )
Takes `n` and adds it as a text value to the string buffer.
( n1 -- n1 n1 )
Duplicates the value on top of the stack, leaving the duplicate on the top of the stack.
( n -- )
Removes the value on top of the stack and throws it away (does nothing with it beyond removing it from the stack).
( n1 n2 -- n2 n1 )
Swaps the positions of the top two stack values.
( n1 n2 -- n1 n2 n1 )
Copies the number below the top value on the stack and adds the copy to the top of the stack.
( n1 n2 n3 nX... -- )
Removes all values from the stack and throws them away (does nothing with them beyond removing them from the stack).
At present only one range operator exists. Unlike normal operators/functions range operators get added to their cell references. In `A1:B3+`, the `+` is the operator on the range.
Sums all values in the range.
________________________________________________