source:
CIVL/examples/languageFeatures/arrayPointer.cvl
| Last change on this file was ea777aa, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 191 bytes | |
| Rev | Line | |
|---|---|---|
| [36b5ada] | 1 | /* Commandline execution: |
| 2 | * civl verify arrayPointer.cvl | |
| 3 | * */ | |
| [e6b02c8] | 4 | #include<civlc.cvh> |
| [65d5bdfd] | 5 | |
| 6 | void foo(int* array) { | |
| 7 | array[0] = 2; | |
| 8 | } | |
| 9 | ||
| 10 | void main() { | |
| 11 | int a[1]; | |
| 12 | ||
| 13 | foo(a); | |
| [d980649] | 14 | $assert(a[0] == 2); |
| [65d5bdfd] | 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
