//%set debug_print_ccode = true //%set debug_tree = true // The Combination of ARM X_RANGE_ERROR and the reference to any // item in a flexible array [1..?N] // causes compiler error "discrete type, object, value required" main module RANGECHCK declare Test_array : static packed array [1..10] of char enddeclare procedure RANGECHCK (Obj : in ref packed array [1..?N] of char) ARM X_RANGE_ERROR declare (Temp : char) for Index := 0 to N do Temp := Obj [Index] // THIS IS THE BAD GUY... endfor endprocedure RANGECHCK (Test_Array) endmodule