INTERFACEA Value.T is a representation for a Modula-3 value; it is intended to be used in conjunction with the typed Abstract Syntax Tree interface, TypedAST. A Value.T only contains enough information to determine the value if you already know the value's type; therefore Value.T's should generally be paired with Type.T's.Value ;
For good measue, this interface also defines types to represent procedures and exceptions.
TYPE T <: ROOT; (* Integer | Longint | Float | LongFloat | Extended | Array | Set | Record | Text | Null *) Integer = T OBJECT val: INTEGER END; Longint = T OBJECT val: LONGINT END; Float = T OBJECT val: REAL END; LongFloat = T OBJECT val: LONGREAL END; Extended = T OBJECT val: EXTENDED END; Array = T OBJECT elements: REF ARRAY OF T END; Set = T OBJECT elements: REF ARRAY OF BOOLEAN END; Record = T OBJECT elements: REF ARRAY OF T END; (* The field values in the order the fields are declared. *) Txt = T OBJECT val: TEXT END; Null = T OBJECT END; (* The value NIL. *) END Value.