Hi Andrew, Ladislav
This example may help resolve the question in a direct fashion. We can use
do/next to identify the first expression in a block.
>> x: 1 y: 2 z: 3
== 3
>> do/next [do x y z]
== [1 [y z]]
This shows that the inner do consumed only one argument.
>> take2: func [x y] ["hello"]
>> do/next [take2 x y z]
== ["hello" [z]]
This shows the function take2 consumed (as expected) two arguments.
Cheers
-Larry
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 26, 2000 4:27 PM
Subject: [REBOL] Re: variable number of arguments
> GC> Can a function have a variable number of arguments?
>
> AM> No. But you can simulate it, by using 'any-type! function specifiers
and passing unset! as arguments. Better is to use refinements.
>
> LM> Yes, a function can have a variable number of arguments. Do is such a
function, as e.g. in:
>
-----snipped many fun arguments-----------
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.