raz / conform / run / SliceIndex.raz

15 lines · 262 B · raw · history · last change 1d7484fe

1module SliceIndex;
2(* An index checked against a slice's length, which is in memory *)
3import Out;
4
5proc main*;
6var a: [8]I64; s: []I64; i: I64;
7begin
8 s := a[2..5];
9 for i := 0 to 3 do
10 Out.int(i);
11 s[i] := i;
12 end;
13end;
14
15end SliceIndex.