$c+
module test11_3 { semantic arrays
-- semantic test of arrays (1 dimension )
-- instructions:
--	first run as is, get error on array declaration line
--	next change siz to 4. get run time bound error }
private
 constant siz = -4;
 integer i;
 typedefinition integer range [0..siz] zero_four; { error}
 integer array [zero_four] a,b; 
begin
 i := 0;
 do i <= 5 -> read a[i]; i := i+1; od;
 i := 0;
 do i <= 5 -> i := i+1; b[i] := a[6-i]; od;
 i := 0;
 do i <= 5 -> write b[i]; i:= i+1; od;
 end. { one error}
 