main module VARIADIC1 use TEXTIO declare Com_type is [com_a, com_b, com_c, com_d] enddeclare procedure BAD_Proc param com : variadic com_type endparam for I := 1 to high (com) do select com [I] from case COM_A: Out_Line (TTY, "commande A ") case COM_B: Out_Line (TTY, "commande B ") case COM_C: Out_Line (TTY, "commande C ") case COM_D: Out_Line (TTY, "commande D ") endselect endfor endprocedure procedure GOOD_Proc param com : variadic in ref com_type endparam for I := 1 to high (com) do select com [I] from case COM_A: Out_Line (TTY, "commande A ") case COM_B: Out_Line (TTY, "commande B ") case COM_C: Out_Line (TTY, "commande C ") case COM_D: Out_Line (TTY, "commande D ") endselect endfor endprocedure Out_Line (TTY, "*** BAD_PROC ***") BAD_PROC (com_a, com_b, com_d) Out_Line (TTY, "*** GOOD_PROC ***") GOOD_PROC (com_a, com_b, com_d) endmodule