Chapter 3 The Application Description Language

3.11 Type Conversion

Type conversion happens in the following instances:

In the first three cases integers convert to reals, and reals truncate to integers, as indicated by the associated type declarations. Strings are not automatically converted to numeric values. You can use the ADL built-in functions (see Section 3.12, "Built-in Function Calls" page 29) toInteger()and toReal() to perform explicit conversions. In the case of promotion in expressions, any binary operator with one integer and one real operand promotes the integer operand to real before performing the operation. Certain compound types are also implicitly converted.

The only other case of promotion occurs when a string on the left hand side of a send message operator is promoted to a one member list. (see Section 3.13, "Messages" page 30).


AM2 Documentation - 19 NOV 1996

Generated with Harlequin WebMaker