raz / conform / run / SliceBounds.raz

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

1module SliceBounds;
2(* A slice must have 0 <= lo <= hi <= the length *)
3import Out;
4
5proc main*;
6var a: [8]I64; s: []I64; lo: I64;
7begin
8 s := a[0..8];
9 for lo := 0 to 9 by 3 do
10 Out.int(LEN(s[lo..6]));
11 Out.str(" ");
12 end;
13end;
14
15end SliceBounds.