source:
CIVL/examples/languageFeatures/malloc.cvl@
d8bb437
| Last change on this file since d8bb437 was 1dad7eb, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 161 bytes | |
| Line | |
|---|---|
| 1 | #include <civlc.h> |
| 2 | |
| 3 | void main() { |
| 4 | $heap h; |
| 5 | double *p = (double *) $malloc(&h, 5*sizeof(double)); |
| 6 | |
| 7 | p[4]=3.14; |
| 8 | $assert(p[4]==3.14); |
| 9 | $free(&h, p); |
| 10 | } |
Note:
See TracBrowser
for help on using the repository browser.
