| 1 | module Unchecked; |
| 2 | import SYSTEM; |
| 3 | (* A module without index and slice checks *) |
| 4 | check off; |
| 5 | |
| 6 | type Pair* = record a*: [2]INT; b*: INT; end; |
| 7 | |
| 8 | proc get*(p: ^Pair; i: INT): INT; |
| 9 | begin |
| 10 | return p^.a[i]; |
| 11 | end; |
| 12 | |
| 13 | proc width*(s: []const U8; lo, hi: INT): INT; |
| 14 | begin |
| 15 | return LEN(s[lo..hi]); |
| 16 | end; |
| 17 | |
| 18 | end Unchecked. |