co
Statement
process
Declaration
process
Declaration
int i, j = 3; double sum = 0.0;
int wk[7]; # index range 0 to 6 int week[1:7]; # index range 1 to 7
int mth[28]; int month[7, 4]; mtn[10] = 3; month[1, 3] = 4;
int mth[28] = ([28] 0); int month[7, 4] = ([7] ([4] 0));
for [ i = 0 to n - 1 ] a[i] = i; for [ r = 0 to rows - 1, c = 0 to cols - 1 ] m[r, c] = 0;
by
clause allows non-unit steps.
for [ i = 0 to n - 1 by 2 ] a[i] = i;
st
(such that) clause allows selective iterations.
bool primes[1000000] for [ i = 0 to 999999 st prime(i) ] primes[i] = true;
co
Statement
process
Declarationprocess monitor { while (true) { whatever } }
process
Declarationprocess monitor [ i = 1 to n ] { while (true) { whatever } }
This page last modified on 29 May 2003.