Chapter 3 The Application Description Language

3.6 Variable Definitions

You can define base and compound variables at the beginning of any scope (see Section 3.26, "Scope" page 52) using the keywords boolean, integer, real, string, time, vtype, handle, list, and any followed by a non-null list of identifiers (see Section 3.2, "Identifiers" page 14). A variable defined with the keyword any can contain a value of any base or compound type, while variables defined with the other types can only contain values of their defined type. It is an error to assign a value of one type to a variable of another type if the value type cannot be implicitly converted to the variable type (see Section 3.11, "Type Conversion" page 28).

Exiting from an enclosing scope destroys variables, and their values are not preserved across separate entries to that scope. The ADL does not support the C and C++ concept of static variables. The same functionality can usually be provided by a class common data member, although it is currently unimplemented.
Sample Variable Definitions
integer anInt, myInt, yourInt;
list A, B;
string daysOfWeek;


AM2 Documentation - 19 NOV 1996

Generated with Harlequin WebMaker