Hi:
You wouldn't need to pass the number of args:
Just get the length of the block from within the function body
i.e:
test: func[args[block!] /local num-args]
[
num-args: length? args
print num-args
foreach arg args [print type? arg]
]
test ["one" 2 3:00]
After dealing with my own variable argument issues in C/C++, this is
so nice!
HTH
:) regards
Tim
[EMAIL PROTECTED] wrote:
> Is it possible to design a rebol function that takes a variable number of
> arguments, ie:
>
> va-func 1 2
> va-func 1 2 3
> va-func 1 2 3 4
>
> What immediately comes to mind is to use a block for the varargs part of the
> call, ie
>
> va-func 1 [2]
> va-func 1 [2 3]
> va-func 1 [2 3 4]
>
> But I thought I would just jog the brains of those around me :-)
>
> terrence-brannon: [[EMAIL PROTECTED] perl-refugee myth-gamer]
> free-email: http://www.MailAndNews.com
> free-usenet: http://www.mailAndNews.com
> ; all the above is real REBOL code, believe it or not.