Integer colour sets | CPN Tools help |
CPN ML |
with
clause, in which case it is small.
colset name = int [with int-exp1...int-exp2];
with
Clauseint-exp1
and int-exp2
. It must be the case that int-exp1
<=int-exp2
.
colset INT = int;
colset SmallInt = int with 1..10;
An integer colour set using the with
clause is used in the example CP-net Simple Protocol.
var smallInt : SmallInt;
The CPN variable smallInt
may have a range of integer values from 1 to 10. For example, 2 is a legal value, but 11 is not and 2.9 is not.
~i |
negation of the integer value i |
i1 + i2 |
addition |
i1 - i2 |
subtraction |
i1 * i2 |
multiplication |
i1 div i2 |
division, quotient |
i1 mod i2 |
modulus, remainder |
abs i |
absolute value of i |
Int.min(i1,i2) |
minimum of i1 and i2 |
Int.max(i1,i2) |
maximum of i1 and i2 |
See also colour set functions.
For additional details and functions see the INTEGER signature in the SML Basis Library Manual.