These functions create special values used for missing data and invalid numeric results.
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'); };
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