Wilang Documentation1.0.0+4

unit#

Create a unit.

Available in: math cells, REPL.

Syntax#

value unit
unit(value, unit)
unit(string)

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (unit).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
unit(7.1, "kilogram")

Expected result: 7.1 kilogram.

See also#

bignumber · boolean · complex · index · matrix · number · string

All functions · Math guides