lua-users home
lua-l archive

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


> -----Message d'origine-----
> De : lua-bounces@bazar2.conectiva.com.br [mailto:lua-
> bounces@bazar2.conectiva.com.br] De la part de Roberto Ierusalimschy
> Envoyé : lundi 7 juin 2010 16:31
> À : Lua list
> Objet : Re: 5.2 work3 manual
> 
> > How about the number of elements in the table? (i.e. number of keys
> > whose values aren't nil, for you pedantic types)
> 
> t = {10,20,30; n = 3}
> print(#t)   --> 4
> 
> -- Roberto

Which version is this?

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> t = {10,20,30; n = 3}
> print(#t)
3