source:
CIVL/mods/dev.civl.com/examples/library/civlc/exit.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 345 bytes | |
| Line | |
|---|---|
| 1 | /* Commandline execution: |
| 2 | * civl verify exit.cvl |
| 3 | * */ |
| 4 | #include<civlc.cvh> |
| 5 | |
| 6 | void f() { |
| 7 | for (int i = 0; i < 10; i++) { |
| 8 | if (i == 8) { |
| 9 | $exit(); |
| 10 | } |
| 11 | $assert(i < 9); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | void main() { |
| 16 | $proc procs[4]; |
| 17 | |
| 18 | for (int i = 0; i < 4; i++) { |
| 19 | procs[i] = $spawn f(); |
| 20 | } |
| 21 | for (int i = 0; i < 4; i++) { |
| 22 | $wait(procs[i]); |
| 23 | } |
| 24 | } |
Note:
See TracBrowser
for help on using the repository browser.
