[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

This method would break the REBOL syntax, which depends on
functions having a fixed number of arguments. This is so
that we don't need to put parentheses around argument lists.

>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]

That's the way that standard functions in REBOL do it.

Take a look at the source to the join function for a way
to do argument lists that way.

Brian Hawley

Reply via email to