[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: select("#", ...) idiom
- From: Michael Roth <mroth@...>
- Date: Fri, 16 Sep 2005 00:30:27 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mildred wrote:
> Why not #{...} ?
Behave "wrongly" (in the sense of "feeling" not in the sense of
definition) on nils. Try this:
function a(...)
print(#{...})
end
function b(...)
print(select('#', ...))
end
a(nil) ---> 0
b(nil) ---> 1
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDKfYCSIrOxc3jOmoRArX4AJ4+h8wrYQvkmAYB9qLNQwf4CM7CKwCgs/rI
IWU1kL1BHRYQlkPTIlbKbo8=
=2NLW
-----END PGP SIGNATURE-----