source:
CIVL/examples/specialStatements/when2.cvl
| Last change on this file was ea777aa, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 242 bytes | |
| Rev | Line | |
|---|---|---|
| [1e89eb7] | 1 | #include<civlc.cvh> |
| 2 | ||
| [f654c25] | 3 | int main(){ |
| [1e89eb7] | 4 | int a=10, i=0; |
| [f654c25] | 5 | |
| 6 | $when(a<100){ | |
| [1e89eb7] | 7 | while(a>0 && i<10){ |
| [f654c25] | 8 | a=a-1; |
| [1e89eb7] | 9 | i++; |
| 10 | $assert(a==10-i); | |
| 11 | int a=-1; | |
| 12 | $assert(a==-1); | |
| [f654c25] | 13 | } |
| [1e89eb7] | 14 | $assert(a>=0); |
| 15 | int a=-1; | |
| 16 | $assert(a==-1); | |
| [f654c25] | 17 | } |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
