RosettaCodeData/Task/Variadic-function/Euler-Math-Toolbox/variadic-function.euler

16 lines
195 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
>function allargs () ...
$ loop 1 to argn();
$ args(#),
$ end
$endfunction
>allargs(1,3,"Test",1:2)
1
3
Test
[ 1 2 ]
>function args test (x) := {x,x^2,x^3}
>allargs(test(4))
4
16
64