Value types

The seven value types
Values are the result of a formula evaluation. There are seven different types that are outlined in the following table. The table lists the names of the different types, their meaning, some special behavior, and also how they are displayed in the user interface.

Value type Meaning Displayed as Example
Numeric value Contains a number. Right aligned number. 37
Text value String of characters Left aligned text. sand dune
Logical value Can be either true or false. Centered true/false message. true
Message value String of characters that indicate a special condition in the solution. Centered text that is surrounded by parentheses. (circular)
(range)
Null value Contain no information Blank  
Reference value Reference to a high level structure such as table, a row or a chart. Has icon to represent the referenced item.  Table
 plot
Error value Contain error message Centered red text. Invalid formula
Table: The seven value types.

Converting one type to another.
NumericBase sometimes needs to convert one type to another. This is done according to the following table. In this table, note that there is no conversion to range, null, reference, and error value. This is because NumericBase never needs to convert to these value. From the same reason, there is no conversion from error value and message value.

 from   to  Numeric value Text value Logical value
numeric value n/a scientific representation False if the number is zero, true otherwise
text value 0 n/a true
logical value 0 "true"/"false" text value n/a
null value 0 Empty string - "" false
reference value 0 The text shown next to the reference icon. false
Table: Conversion table.

Login to post comments