source:
CIVL/examples/languageFeatures/bundleArray.cvl@
4e048c3
| Last change on this file since 4e048c3 was 36b5ada, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 303 bytes | |
| Rev | Line | |
|---|---|---|
| [36b5ada] | 1 | /* Commandline execution: |
| 2 | * civl verify bundleArray.cvl | |
| 3 | * */ | |
| [40f937d] | 4 | #include<civlc.h> |
| 5 | ||
| 6 | $input int N; | |
| 7 | $assume(N>=2); | |
| 8 | $input double a[N]; | |
| 9 | ||
| 10 | void main() { | |
| 11 | double b[N]; | |
| 12 | $bundle bun; | |
| 13 | ||
| 14 | bun = $bundle_pack(&a[0], N*sizeof(double)); | |
| [823c3cb] | 15 | $bundle_unpack(bun, &b[0]); |
| [40f937d] | 16 | $assert(a[0]==b[0]); |
| 17 | $assert(a[1]==b[1]); | |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
