Variadic function: Difference between revisions

m (→‎{{header|Sidef}}: removed an unneeded semicolon)
Line 1,446:
 
<lang perl6>foo |@ary, |%hsh;</lang>
 
=={{header|Phix}}==
Copy of [[Variadic_function#Euphoria|Euphoria]]. The argument to print_args could be anything constructed at runtime. You can also specify optional parameters, simply by specifying a default value. Any non-optional arguments must be grouped together at the start.
<lang Phix>procedure print_args(sequence args)
for i=1 to length(args) do
?args[i]
end for
end procedure
print_args({"Mary", "had", "a", "little", "lamb"})</lang>
 
=={{header|PHP}}==
7,806

edits