StrikekitStrikekit

calculate

Evaluate arithmetic into an @ or @@ slot

Evaluate an expression and write the result into a slot. Does not overwrite $ENV.

Syntax

When I calculate "@slot" as "<expression>"

Operators: + - * / % ^ and ( ). Standard precedence (2+3*4 → 14); ^ is right-associative (-2^2 → -4).

Qualifiers

QualifierRoleExample
asExpression stringcalculate "@line" as "50*3"

Requirements

ItemContract
Element / control shapeNone — arithmetic into a slot
How the label bindsFirst quote is destination slot; expression after as is a payload
Qualifiers that change resolveas
PlatformAll
Wrong shape → use insteadN/A

See also UI contracts.

Examples

When I calculate "@line" as "50*3"
When I calculate "@area" as "2^3"
When I calculate "@tax" as "$TAX_RATE*2"
When I fill "Amount" with "@line"

Notes

  • Inside the expression, @ / @@ / $ tokens are scanned left-to-right.
  • Substituted display values go through number-only parse. Result is a plain decimal (no currency/commas).
  • In calculate expressions, * and ^ are arithmetic — not label globs.

On this page