1.23
2.0
main
test-branch
|
Last change
on this file since c777ef2 was f28d814, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago |
|
Updated Makefile. Changed examples to use civlc.h and $ instead of \ at beginning of CIVL keywords.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@59 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
368 bytes
|
| Line | |
|---|
| 1 | #include<civlc.h>
|
|---|
| 2 |
|
|---|
| 3 | int x;
|
|---|
| 4 | int y;
|
|---|
| 5 |
|
|---|
| 6 | void f(int n) {
|
|---|
| 7 | for (int i=0; i<n; i++) {
|
|---|
| 8 | $when (x==0) x=1;
|
|---|
| 9 | $when (y==0) y=1;
|
|---|
| 10 | y=0;
|
|---|
| 11 | x=0;
|
|---|
| 12 | }
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | void g(int m) {
|
|---|
| 16 | for (int i=0; i<m; i++) {
|
|---|
| 17 | $when (y==0) y=1;
|
|---|
| 18 | $when (x==0) x=1;
|
|---|
| 19 | x=0;
|
|---|
| 20 | y=0;
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | void main() {
|
|---|
| 25 | x = 0;
|
|---|
| 26 | y = 0;
|
|---|
| 27 | $proc p = $spawn f(10);
|
|---|
| 28 | $proc q = $spawn g(10);
|
|---|
| 29 | \wait p;
|
|---|
| 30 | \wait q;
|
|---|
| 31 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.