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