@c+
module test12_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
 const siz = -4;
 integer i;
 typedef 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
 