[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to determine if all arguments are nil?
- From: Tim Hunter <TimHunter@...>
- Date: Thu, 28 Jun 2007 20:39:14 -0400
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]