exprv4:reference:functions:none_and_nan

Table of Contents



None and NaN Functions

These functions create special values used for missing data and invalid numeric results.


none()

Creates the `none()` value.

Item Description
Syntax `none()`
Arguments none
Returns none value

Use `none()` when a value is intentionally missing or optional.

Example:

value = none();
 
if(value.is_none())
{
    print('value is missing');
};

nan()

Creates a numeric NaN value.

Item Description
Syntax `nan()`
Arguments none
Returns numeric NaN

Use `nan()` when a calculation produced an invalid numeric result, but the value should still be treated as a number.

Example:

value = nan();
 
value.is_num();          // true
value.is_num_notnan();   // false

Previous: Built-in functions

Next: Arithmetic

exprv4/reference/functions/none_and_nan.txt · Last modified: by 127.0.0.1

Page Tools