raz
/
conform
/
run
/ ViewNegative.raz
about
files
log
releases
feed
18 lines · 263 B ·
raw
·
history
· last change
f784f531
1
module
ViewNegative;
2
(* A negative index to a view is past the end too *)
3
import
Out;
4
5
var
mem: [
16
]
U8
;
6
7
proc
at(i:
INT
):
I64
;
8
begin
9
return
mem[i].(
I64
);
10
end
;
11
12
proc
main*;
13
begin
14
Out.int(at(
0
)); Out.ln;
15
Out.int(at(-
1
)); Out.ln;
16
end
;
17
18
end
ViewNegative.