source:
CIVL/examples/experimental/returnNull.cvl@
afc300c
| Last change on this file since afc300c was dd68f66, checked in by , 11 years ago | |
|---|---|
|
|
| File size: 286 bytes | |
| Line | |
|---|---|
| 1 | /* |
| 2 | * This example is to test executeReturn() function when it has returned |
| 3 | * without a return value |
| 4 | * */ |
| 5 | #include<civlc.cvh> |
| 6 | #include<stdio.h> |
| 7 | |
| 8 | int returnDouble(){ |
| 9 | int a = 6; |
| 10 | if(a<5){ |
| 11 | return 2*a; |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | void main(){ |
| 16 | int x = returnDouble(); |
| 17 | printf("Double is %d", x); |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
