Wilang Documentation1.0.0+4

format#

Format a value of any type as string.

Available in: math cells, REPL.

Syntax#

format(value)
format(value, precision)

Arguments and behavior#

Returns the value as text. With a precision argument it rounds to that many decimals, so format(1/3, 4) is 0.3333. Notation controls apply here too, and this overrides the app-wide display setting for that expression only.

Example#

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

Example
format(2.3)

Expected result: "2.3".

See also#

print

All functions · Math guides