|
NAME
SYNTAX
DESCRIPTION
EXAMPLES
mtype = { ack, nak, err, next, accept }is functionally equivalent to the sequence of macro definitions: #define ack 1 #define nak 2 #define err 3 #define next 4 #define accept 5The convention is to place an assignment operator in between the keyword mtype and the list of symbolic names that follows, but it is not strictly required. The symbolic names are preserved in tracebacks and error reports for all data that is explicitly declared with data type mtype . For instance, mtype a; mtype p[4] = nak; chan q = [4] of { mtype, byte, short, mtype }; NOTES
In version 3.3 and later, more than one mtype declaration may appear in a single specification. In this case, the mtype declarations are automatically concatenated by the parser, in the order in which they appear in the specification. The upper limit of 255 distinct symbolic names declared in one or more mtype declarations still holds. SEE ALSO
|