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