It is possible to embed complex mathematical equations and logical formulae in the document logic.
{ %=(x.price * (1 + x.tax_pct))% }+, -, *, /, %.| operator | symbol | example | meaning |
|---|---|---|---|
| addition | + | a + b | sum of a and b |
| subtraction | - | a - b, x-1 | value of a minus b |
| multiplication | * | a*b | value of a multiplied by b |
| division | / | a/b | value of a divided by b |
| modulo | % | a%b | remainder of a after divided by b |
You can use logical operators in the expressions. These are useful inside conditional expressions.
| operator | symbol | example | meaning |
|---|---|---|---|
| conjuction (and) | & | a & b | both a and b are not null and not false values |
| disjunction (or) | | | a|b | either a or b or both are not null or false |
| negation (not) | ! | !a | value a is false or null |
There are simple functions you can call from within the template documents. Read more on the Functions documentation
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |