source:
CIVL/mods/dev.civl.com/examples/por/spawns.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 214 bytes | |
| Rev | Line | |
|---|---|---|
| [cbea8be] | 1 | #include <civlc.cvh> |
| 2 | #include <memory.cvh> | |
| 3 | ||
| 4 | int X=0; | |
| 5 | ||
| 6 | void p(int*x) | |
| 7 | { | |
| 8 | *x=10; | |
| 9 | } | |
| 10 | ||
| 11 | void q(int *x){ | |
| 12 | *x = 20; | |
| 13 | } | |
| 14 | ||
| 15 | ||
| 16 | void main(){ | |
| 17 | $proc px=$spawn p(&X), py=$spawn q(&X); | |
| 18 | $wait(px); | |
| 19 | $wait(py); | |
| 20 | $assert(X==20); | |
| 21 | } |
Note:
See TracBrowser
for help on using the repository browser.
