source:
CIVL/mods/dev.civl.com/examples/library/civlc/assertBad.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 241 bytes | |
| Rev | Line | |
|---|---|---|
| [5d1eb5a] | 1 | #include<civlc.cvh> |
| 2 | ||
| [b881a0e] | 3 | int check(int a, int b, int c, int d){ |
| [fd6d345] | 4 | $assert((a+b) == (c+d), "assertion failed!\n"); |
| [b881a0e] | 5 | } |
| 6 | ||
| 7 | int thread($proc x){ | |
| 8 | $wait(x); | |
| 9 | } | |
| 10 | ||
| [5d1eb5a] | 11 | int main(){ |
| 12 | int a = 1, b = 2, c = 3, d = 4; | |
| 13 | ||
| [b881a0e] | 14 | $spawn thread($self); |
| 15 | check(a,b,c,d); | |
| [5d1eb5a] | 16 | } |
| 17 |
Note:
See TracBrowser
for help on using the repository browser.
