1.23
2.0
main
test-branch
|
Last change
on this file since 4ceb0ef was 7e53a41, checked in by Manchun Zheng <zmanchun@…>, 12 years ago |
|
fixed the bug in parsing a main function with a non-void return type; fixed a trivial bug in the MPI transformer.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@938 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
311 bytes
|
| Line | |
|---|
| 1 | #include <civlc.h>
|
|---|
| 2 |
|
|---|
| 3 | void main(){
|
|---|
| 4 | int a[5];
|
|---|
| 5 | $int_iter iter;
|
|---|
| 6 | int k = 0;
|
|---|
| 7 |
|
|---|
| 8 | for(int i = 0; i < 5; i++)
|
|---|
| 9 | a[i] = i;
|
|---|
| 10 | iter = $int_iter_create($here, a, 5);
|
|---|
| 11 | while($int_iter_hasNext(iter)) {
|
|---|
| 12 | int current = $int_iter_next(iter);
|
|---|
| 13 |
|
|---|
| 14 | $assert(current == k);
|
|---|
| 15 | k++;
|
|---|
| 16 | }
|
|---|
| 17 | $int_iter_destroy(iter);
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.