[Next] [Up] [Previous]

The ORDINAL Statement

(ORD)

The ORDINAL statement has the form

       ORDINAL series-name;element-1,element-2,element-3,...

where all the arguments are identifiers (that is, they have the form of variable names), and does three things:

If a statement of the form

       ORDINAL(integer-type) series-name;element-1,element-2,element-3,...

is used instead, no new type is created, and the elements have integer type.

If it is desired to specify the integer type used to store an ordinal, but the ordinal is still desired to be of a new, non-arithmetical type, replace (integer-type) by (NEW, integer-type).

It will cause an error to give elements of two different ordinal types the same name.

Note that the names of user-defined types normally occupy a different symbol table during compilation than other identifiers: a user-defined type may have the same name as a variable without causing confusion. Here, since series-name is (possibly) a type name and a function name, it is an entry in both symbol tables when it performs both functions.


[Next] [Up] [Previous]