lua-users home
lua-l archive

Re: Surprising behavior of table.insert()

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


On Fri, Feb 25, 2011 at 3:22 PM, Hisham <hisham.hm@gmail.com> wrote:
> I have a function
> that may or may not return a value, and insert that value into a
> table.
if you return at most one value, just wrap your function call in parenthesis.
table.insert (t,(f()))
-- 
Javier

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