source:
CIVL/mods/dev.civl.com/examples/sideEffects/malloc.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 173 bytes | |
| Rev | Line | |
|---|---|---|
| [9803bc1] | 1 | #include<civlc.cvh> |
| [0f03d75] | 2 | #include<stdlib.h> |
| 3 | #include<assert.h> | |
| 4 | ||
| 5 | void main() { | |
| 6 | double *a; | |
| 7 | int m = 5; | |
| 8 | ||
| 9 | if ( (a=(double *)malloc(m*sizeof(double))) == NULL ) | |
| 10 | assert(0); | |
| 11 | } |
Note:
See TracBrowser
for help on using the repository browser.
