length Function

Returns the number of elements in the argument. The result will be 1 for a scalar and 0 for an empty value.

The Length function is the only function which will not return an error if supplied with an 'empty' value. Empty variables are returned by some functions when they cannot produce a return value. All other functions and operators will yield an error if presented with an empty value and abort any script that called it.


Number Type Compulsory Default Description
1 any Yes Vector


Return type: real