lua-users home
lua-l archive

Re: Expanding multiple return values of Lua functions in a Lua table constructor

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Oct 18, 2012 at 8:48 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> The explicit appearance of the brackets would warn the reader that after
> `t={[a()],[b()],"third"}` something other than `t[3]` might be`"third"`.
This reads well, and would probably be easier to do and less confusing
than the postfix ... that has been suggested.
It means that {[1,2],[3,4]} is just a fancy way of saying {1,2,3,4}
steve d.

AltStyle によって変換されたページ (->オリジナル) /