source:
CIVL/mods/dev.civl.com/examples/languageFeatures/intToPointer.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 163 bytes | |
| Rev | Line | |
|---|---|---|
| [39b7d2e] | 1 | #include<civlc.cvh> |
| 2 | ||
| 3 | int main(){ | |
| 4 | int a, *p, t; | |
| 5 | void*q; | |
| 6 | ||
| 7 | p=&a; | |
| 8 | t=(int)p; | |
| 9 | p=(int*)t; | |
| 10 | $assert(p==&a); | |
| 11 | a=9; | |
| 12 | q=(void*)a; | |
| 13 | t=(int)q; | |
| 14 | $assert(t==a); | |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
