Sidebar

Home



Expressions V4


Tutorials

How-To

Reference

  Lexical basics
  Type system
  Variables and assignment
  Operators
  Expression rules
  Control flow
  Functions
  Built-in functions
   None and NaN
   Arithmetic
   Algebra
   Logarithmic and Exponential
   Trigonometric
   Rounding and Centering
   Strings
   Output, Formatting, Clipboard, and Errors
   Dialog Functions
   Platform and Paths
  Methods and properties
  Built-in methods
   Common Value Methods
   Number Methods
   String Basic Methods
   String Slice Methods
   String Parsing Methods
   String Formatting Methods
   String Regex Methods
   String Trim and Case Methods
  Objects
  Built-in objects
   Global objects
    settings
    controller
    session
    python
   Collections
    array
    map
    bytes
   File Format I/O
    image_data
    image_stream
   Utils
    crypto
    timer
   Comm
    serial
   Dialogs
    file_open
    file_save
    msg_ok
    msg_ok_cancel
    msg_yes_no
    msg_password
   GUI objects
    window
    panel
    group
    splitpanel
    label
    textbutton
    drawablebutton
    togglebutton
    togglegroup
    textinput
    textedit
    numinput
    slider
    combobox
    listbox
    progressbar
    led
    separator
    menu
    image
    snake
  Classes and user-defined objects
  Include system
  Error model
  Execution model and sessions
  Host integration
  Limits and performance
  Formal reference
  Glossary

Cookbook

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 andrej

Page Tools