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