LAD Project: the PRIMTYPE Module


Summary: The PRIMTYPE object serves the following purpose. It represents a the type of a dynamically typed value. Compound types are permitted, made from the basic concept of a sequence.
Abstract Datatype: primtype
Current legal [primtype]s:

int bool real string sequence They are denoted by the following #defined int constants (from [primtype] module): The following are codes for the four primitive (i.e. non-compound types) that a value may have.

INT_VALUE
BOOL_VALUE
REAL_VALUE
STRING_VALUE
A fifth #defined int constant denotes a sequence of some kind:
SEQUENCE_VALUE

char *string_from_primtype(int [primtype]);
primtype must be one of the ???_VALUE constants described above. Returns a mustn't-be-updated string describing the primtype: one of "int" , "bool" .. "sequence".