source:
CIVL/examples/library/civlc/equals.cvl@
897c8d7
| Last change on this file since 897c8d7 was d980649, checked in by , 10 years ago | |
|---|---|
|
|
| File size: 302 bytes | |
| Line | |
|---|---|
| 1 | #include<civlc.cvh> |
| 2 | #include<pointer.cvh> |
| 3 | |
| 4 | void main(){ |
| 5 | int* data; |
| 6 | _Bool result; |
| 7 | int a = 1; |
| 8 | |
| 9 | data = (int*) $malloc($root, sizeof(int)*2); |
| 10 | *data = 1; |
| 11 | *(data + 1) = 2; |
| 12 | result = $equals(data, data+1); |
| 13 | $assert(!result); |
| 14 | result = $equals(data, &a); |
| 15 | $assert(result); |
| 16 | $free(data); |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
