lua-users home
lua-l archive

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


On Wed, Dec 7, 2011 at 20:00, startx <startx@plentyfact.org> wrote:
> table.insert(t,s)
> print(t.s)          -- nil
> print(type(t.s)) -- nil
>
> d = t.s
> print(#d)        -- ERROR

I think you meant:

table.insert( t, s )
print( t[ 1 ] ) -- empty line
print( type( t[ 1 ] ) ) -- string
d = t[ 1 ]
print( #d ) -- 0

--rb