//--------------------------------------------------------------- // Test of range checking of subscripts in array constructors //-------------------------------------------------------------- %define debug %set debug=false %if debug %set debug_print_ccode=true %endif main module ARCRANGE %if not debug use TEXTIO %endif declare AAAAA_range is -1..1 AAAAA_mess is packed array [1..4] of char BBBBB_type is array [AAAAA_range] of AAAAA_mess // indexes on following are out of range BBBBB : static BBBBB_type initially BBBBB_type ([-2]:"JOE ", [0]:"SAM ", [2]:"PETE") enddeclare BBBBB [0] := "ABCD" %if not debug out_line (TTY, "------------------") for I in AAAAA_range do out_line (TTY, BBBBB[I]) endfor out_line (TTY, "------------------") %endif endmodule