Manuals/calci/UNITSFAILTONULL
Jump to navigation
Jump to search
UNITSFAILTONULL
Description
- UNITSFAILTONULL will return the result as false.
- If is set to true, and a number does not have units that match during conversion, it is set to null.
- by default is set to false.
- In general, if a conversion fails, the original value with units are returned.
- This behavior can be changed so that a unit conversion if not possible, would return a null value.
- To do this, change the global variable UNITSFAILTONULL to true.
- The following will give 1m as the result.
1m<>eor
1 m
UNITSFAILTONULL=true
1m<>eor
will now give null as the result.
UNITSFAILTONULL=false
1m<>eor
1 m
will be shown as the result.
Example
- UNITSFAILTONULL = false