| 1 | module CheckOff; |
| 2 | (* check off leaves out the checks of its own module only: here |
| 3 | Unchecked reads past an array, into the field after it, and makes a |
| 4 | slice past its string's end; then this module's own index fails *) |
| 5 | import Out, Unchecked; |
| 6 | import SYSTEM; |
| 7 | |
| 8 | proc main*; |
| 9 | var p: Unchecked.Pair; i: INT; |
| 10 | begin |
| 11 | p.b := 42; |
| 12 | Out.int(Unchecked.get(SYSTEM.ADR(p), 2)); Out.str(" "); |
| 13 | Out.int(Unchecked.width("abc", 1, 5)); Out.ln; |
| 14 | Out.flush; |
| 15 | i := 2; |
| 16 | Out.int(p.a[i]); |
| 17 | end; |
| 18 | |
| 19 | end CheckOff. |