Types conversion
Conversion which is also referred to as "casting" or "type casting" is a process of changing one data type to a different one.
PolyAnalyst may automatically change the type of a value when evaluating a SRL expression. For example, considering adding 5.5 to 1 to get 6.5:
1) In the expression 5.5 + 1, the integer 1 is first converted to the Numeric value 1.0 (so the expression becomes 5.5 + 1.0).
2) Now we sum two values of the same type and get 6.5
The integer value 1 went through a type conversion in order to satisfy the requirement that each operand (each value) of the addition operator has the same type.
Type conversion also takes place when working with some of the other data types.
The + operator can be used for concatenation of strings, which means to take the characters of one string and append those characters to the end of another string ("hello" + "world" returns a string, i.e. "helloworld").