Chapter 3 The Application Description Language

3.3 Base Types

The system recognizes the base, or primitive, types boolean, integer, real, string, vtype, and handle.

Boolean

A boolean must have the value TRUE or FALSE.

Integer

An integer corresponds to a C/C++ long and is represented with at least 32 bits.

Real

A real corresponds to a C/C++ double. The minimum and maximum positive values of a real are platform dependent, but should accommodate a range of at least 10.0-38 to 10.038 .

String

An ADL string represents an ASCII string implemented using an underlying C++ class, and, thus, does not correspond exactly to a C/C++ char*. The only restrictions on maximum string length are implementation dependent, but in all AM2 implementations strings are guaranteed to have a maximum length of at least 65535 bytes. If the integer constant MAX_STRING_LENGTH has a value greater than 0, that value specifies the maximum allowed string length.

Vtype

A vtype allows storage of types of variables, and is used for type-checking.

Handle

A handle to a lvalue of a base type or a compound type (see Section 3.5, "Compound Types" page 16), or to an ADL object represents a reference to the underlying variable or object. It is a more general case of the C/C++ pointer, in that AM2 will eventually support handles to objects in other AM2 process spaces. AM2 handles do not support the full semantics of C/C++ pointers. In particular, there is no relation between handles and arrays in the ADL, and handle arithmetic is not allowed.


AM2 Documentation - 19 NOV 1996

Generated with Harlequin WebMaker