lua-users home
lua-l archive

Re: select("#", ...) idiom

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


-----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-----

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