[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table & multiple arguments
- From: Renato Cerqueira <rcerq@...>
- Date: Mon, 23 Apr 2001 09:35:26 -0500
paul@thev.net wrote:
>
> >From the manual, I see a function can take indefinite number of
> arguments by taking them from a table. But how about the reverse?
>
> function foo(a, b, c)
> print(a, b, c)
> end
>
> Doing foo(1, 2, 3) works perfectly, but
>
> x = { 1, 2, 3 }
> foo(x)
>
> is an obvious error. How do I pass a flattened table as function
> arguments?
Try
call(foo,x)
Regards,
Renato