// Test the size of a flexible array //% set debug_print_ccode = true main module size2 use TEXTIO procedure print_size (a: in ref packed array[1..?n] of char) out_string (tty, "for string ") out_string (tty, a) out_String (tty, " High=") out_integer (tty, high(a)) out_string (tty, " size=") out_integer (tty, integer(sizeof(a))) out_record (tty) endprocedure {Print_size} procedure ip (a: in ref packed array[1..?n] of char) print_size(a) endprocedure {ip} procedure dp param a: in ref packed array[1..?n] of char b: in ref packed array[1..?m] of char endparam print_size(a) print_size(b) endprocedure {dp} dp("ABCDE","ABCD") dp("ABCD","ABCDE") endmodule