source:
CIVL/mods/dev.civl.com/examples/mem/mem_tests/mem_convertion3.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 228 bytes | |
| Line | |
|---|---|
| 1 | #include<mem.cvh> |
| 2 | #include<pointer.cvh> |
| 3 | |
| 4 | int main() { |
| 5 | $mem m; |
| 6 | int * a; |
| 7 | int b; |
| 8 | int c[10]; |
| 9 | |
| 10 | a = &b; |
| 11 | // referecne to variable with undefined value |
| 12 | m = a; |
| 13 | a = &c[0]; |
| 14 | m = a + (0 .. 9); |
| 15 | $assert($equals(&m, &m)); |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
