Calculation Formulas
Back to Calculation Formulas Overview
Automatic Type Conversion
Operators and functions usually require their operands and arguments to be of a certain type. However, under some circumstances it is possible to supply an expression of a different type as an operand or argument, which will then automatically be converted to the required type.
- Automatic conversion to Text: Whenever an operand or argument of type
Text is required, an expression either of type Text or of type Number can be supplied. In the latter case, the
number will then first be converted into a text before the operator or
function is applied. For this conversion, the number-value is simply converted into the corresponding
string representation; for example, the number 157 becomes the text string "157".
- Automatic conversion to Number Set: Whenever an operand or argument of type
Number Set is required, an expression either of type Number Set or of type Number can be supplied.
In the latter case, the number will then be converted into a number set with a single element
before the operator or function is applied.
- Automatic conversion to Text Set: Whenever an operand or argument of type
Text Set is required, an expression either of type Text Set, Number Set, Text, or Number can be supplied.
In the latter cases, a conversion to Text Set will be performed before the operator or function is applied:
A Number Set is converted into a Text Set by converting each single number element into a text element (see "conversion to Text" above).
A Text is converted into a Text Set by creating a Text Set with the single text as the only element.
A Number is converted into a Text Set by creating a Text Set with the single number as the only element, where the number in turn is first converted into a text.
See also: Data Types