[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Table assignments in varargs function call
- From: Eric Tetz <erictetz@...>
- Date: Tue, 20 Nov 2001 14:57:01 -0800 (PST)
--- Peter Loveday <peter@eyeonline.com> wrote:
> I am trying to achieve syntax like:
>
> function xyzzy(...)
> ...
> end
>
> a = xyzzy(A = 1, B = 2)
>
> Is there any way to achieve this? I currently have:
>
> function xyzzy(tbl)
> ...
> end
>
> a = xyzzy({ A = 1, B = 2})
You can just say:
a = xyzzy{ A = 1, B = 2 }
Cheers,
Eric
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1