Wilang Documentation1.0.0+4

number#

Create a number or convert a string or boolean into a number.

Available in: math cells, REPL.

Syntax#

x
number(x)
number(unit, valuelessUnit)

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 (number).

Example#

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

Example
number(2)

Expected result: 2.

See also#

bignumber · bigint · boolean · complex · fraction · index · matrix · string · unit

All functions · Math guides