A union color set is a disjoint union of previously declared color sets.
Declaration Syntax
colset name = union id1[:name1] + id2[:name2] + … + idn[:namen];
If namei is omitted then idi is treated as a new value, and it can be referred to simply as idi.
Order
first after selectors, then after ordering of each base color set
Values
idi v
idi(v)
where v has type namei.
Declaration examples
colset Data = string with “A”..”z” and 0..8;
colset Packet = union DATA:Data + ACK;
var packet : Packet;
The CPN variable packet may have values of the form ACK , DATA(str), or DATA str where str is a string containing only letters and has length up to 8. For example, ACK, DATA("contents"), and DATA "contents' are legal values, but ACK("okay"), DATA("abc123") and DATA are not.
Operations
See also color set functions.

You must be logged in to post a comment.