runtime/src/common/RTTypeSRC.i3


Copyright (C) 1994, Digital Equipment Corp.

RTTypeSRC provides SRC Modula-3 extensions to RTType and RTTypeFP.

INTERFACE RTTypeSRC;

IMPORT RT0;

PROCEDURE TypeName (ref: REFANY): TEXT;
= TypecodeName (TYPECODE (ref))

PROCEDURE TypecodeName (tc: RT0.Typecode): TEXT;
Returns a text describing the ref whose typecode = tc. Its heuristic is to consider, in order, named typecells, brands, arrays, object-subtypes, objects, and procedures. If all else fails, it returns <?>.

PROCEDURE FindType (id: INTEGER): RT0.TypeDefn;
Returns the type descriptor with UID id. If no such type exists, reutrns NIL.
------------------------------------------------------------------ setup --

PROCEDURE Init ();
called by the startup code to initialize the runtime type system.

END RTTypeSRC.