lua-users home
lua-l archive

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


I have a varargs function. What is the Lua idiomatic way of determining if all the arguments are nil? I've thought of two ways:

1. #{...} == 0
2. next{...} == nil

This function is called very frequently, so I'd prefer not to have to create a table if I can avoid it.

--
RMagick OS X Installer [http://rubyforge.org/projects/rmagick/]
RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?forum_id=1618]
RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html]