1.23
2.0
main
test-branch
|
Last change
on this file since c777ef2 was 6543229, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago |
|
Added pointer example and test, fix bug in evaluator when dereferencing a pointer to an array element.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@61 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
173 bytes
|
| Line | |
|---|
| 1 | #include<civlc.h>
|
|---|
| 2 |
|
|---|
| 3 | void main() {
|
|---|
| 4 | int a;
|
|---|
| 5 | int* b;
|
|---|
| 6 | int c[2];
|
|---|
| 7 | int* d;
|
|---|
| 8 |
|
|---|
| 9 | a = 1;
|
|---|
| 10 | b = &a;
|
|---|
| 11 | c[0] = 0;
|
|---|
| 12 | c[1] = 1;
|
|---|
| 13 | d = &c[1];
|
|---|
| 14 | $assert *b == 1;
|
|---|
| 15 | $assert *d == 1;
|
|---|
| 16 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.