source:
CIVL/examples/specialStatements/choose1.cvl@
e2877ba
| Last change on this file since e2877ba was f654c25, checked in by , 11 years ago | |
|---|---|
|
|
| File size: 340 bytes | |
| Line | |
|---|---|
| 1 | #include<civlc.cvh> |
| 2 | |
| 3 | int main(){ |
| 4 | int *ptr, x=1, y=2; |
| 5 | |
| 6 | $choose{ |
| 7 | if(x<=1){ |
| 8 | int a1=0; |
| 9 | y=a1; |
| 10 | }else{ |
| 11 | y=x+1; |
| 12 | } |
| 13 | $when(x<5){ |
| 14 | $when(y>1){ |
| 15 | y=10; |
| 16 | int z=19; |
| 17 | x=z; |
| 18 | } |
| 19 | } |
| 20 | {ptr=(int*)$malloc($root, sizeof(int)); $free(ptr);} |
| 21 | {int q=sizeof(int); ptr=(int*)$malloc($here, q); $free(ptr);} |
| 22 | } |
| 23 | } |
Note:
See TracBrowser
for help on using the repository browser.
