@define definition @then expression @enddefine @define _ @then t @enddefine

Defines a name for a value, to allow later use. Often you may find yourself repeating the same piece of code, which is both tiresome to enter, and awkward when you need to edit it in multiple places later. By defining a name for the shared code, it's easier to reference and edit.

Another use for definitions is to do pattern matching, especially for things like optional types; for example @define Is(x) = Column with optional type @then x @enddefine

ExamplesClick an example to insert it
@define feet mm = convert unit(unit{mm},1{foot}) @then (6 * feet mm) * (4 * feet mm) @enddefine2229672.96{mm^2}
@define sq = @function(x) @then x*x @endfunction, x = sq(256) @then x - 1 @enddefine65535
@define distance :: type{Number{m}}, distance = from text("23") @then distance * 2 @enddefine46{m}