INSPECT

Returns a text containing the representation of a value.

The returned text is what you would have to write in a command to get that value.

Usage

INSPECT(value)

Parameters

value

(Required) The value to inspect

Examples

Example With these variables Result

INSPECT(123)

val is 123

“123”

INSPECT(val)

val is "123"

”"”123”””

INSPECT(val)

val is 9.99

“9.99”

INSPECT(val)

val is DATE(2021, 2, 3)

“DATE(2021, 2, 3)”

INSPECT(val)

val is [1, 2, 3]

“[1, 2, 3]”

INSPECT(val)

val is NOTHING

“NOTHING”

INSPECT(val)

val is TRUE

“TRUE”

INSPECT(val)

val is FALSE

“FALSE”

More information

This function is helpful mostly to see the result of an operation in a way that keeps information about the type of the value (because texts get wrapped in quotes while numbers don’t).

Clarification: in a text, to represent a single quote character ("), you write 2 consecutive ones.

Note: The results in the examples here may appear to have too many quotes. This is normal. The results shown in function’s examples always use INSPECT to highlight texts vs. numbers (by having quotes or not). So the results here effectively use INSPECT twice. Use INSPECT in the sandbox or a document to clarify the result.

INSPECT can handle lists, which TEXT cannot.

See also