Dotdown™ · settings
Settings and info
The top of a calculator: its name, how it rounds, and notes to yourself.
Title and description
.input qty: Quantity.r1 Total: qty × 12
- Between two
---lines at the very top: the first line is the title, the next lines the description. - Optional. Without the block, a first line starting with
#is the title and the plain line after it is the description.
What an order costs..input qty: Quantity
Settings
.settings, then the keys between braces, before any other command — the same name { key: value }
shape as .module and .constant.
.settings { places: 2, rounding: up, round-each-step, show-steps: false }
| Setting | Does |
|---|---|
places | Decimal places shown, a whole number from 0 to 10. |
rounding | half-up, up or down. Usually 2 places, half-up. |
round-each-step | Round every step before the next one uses it. |
show-steps | List every step’s result above the final answer. On unless you write show-steps: false. |
show-working | Show each step’s formula in words with the customer’s numbers filled in. Off unless named, because it reveals your pricing. |
- The last three are switches: naming one turns it on, and
: falseturns it off. - Only the settings you write change. The rest keep their usual value, and “To text” writes only what differs from it.
Places and rounding
Rounding to 0 places:
rounding | 2.5 | 2.1 | -2.9 |
|---|---|---|---|
half-up | 3 | 2 | -3 |
up | 3 | 3 | -2 |
down | 2 | 2 | -3 |
half-uprounds halves away from zero like school maths.upalways goes to the higher value anddownto the lower one, so on a negative numberupmoves toward zero.- Results show exactly the places you set, so
12.5with 2 places shows12.50.
Round each step
.settings { places: 2, round-each-step }.r1 A third: 1 ÷ 3.r2 Times three: r1 × 3// 0.99, because r1 was rounded to 0.33 first// without round-each-step: 1.00
Use it when the calculator should match a receipt or a printed table, where every line is rounded before it is added.
Comments
// the discount starts above 100.r1 Discount: if qty > 100 then qty × 0.1 else 0
- A line starting with
//is a note to yourself and is ignored. - Comments are not saved in the calculator, so they are gone after “To text” or when the box is reopened.
- Ctrl/⌘ + / comments the selected lines. See Editor keys.