//-------------------------------------------------------------------- // Example of use of variadic, high of variadic, variadic flexible array // main module XVARIADIC use TEXTIO procedure VAR (a: variadic in ref packed array[1..?n] of char) out_String (tty, "high=") out_integer (tty, high (a)) out_record (tty) declare (s: static integer) for i := 1 to high (a) do s := high (a [i]) out_string (tty, "high=") out_integer(tty, s) out_string (tty, " ") out_string (tty, a[i], s) out_Record (tty) endfor endprocedure VAR ("HI", "THERE", "YOU", "ALL") endmodule