lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

h visli a écrit :
> http://www.lua.org/manual/5.1/manual.html#2.5.5
> 
> With the description of manual.html#2.5.5 , the length of b should be 1 rather than 3. Because b[2]'s value is nil, so the array has "holes". 
>

	That's what I thought too, but the manual says
"If the array has "holes" [...], then #t can be any of the indices that
directly precedes a nil value [...]."
	So the result for #a and #b can be *either* 1 or 3, which is what
you've got.

	Thomas.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks50foACgkQBV7eXqefhqgKYQCfQEpoTOIu3/NEB6AWfbwFmwXU
ylcAoKq1sKwvmB9fTP1LYgY2Mqmi2vZG
=J4R7
-----END PGP SIGNATURE-----