lua-users home
lua-l archive

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


Hi,

I'm trying to implement a sparse numeric array in lua 5.

however given:

f = { 1, nil, 10 }

in lua 4, foreachi(f,print) will give:
1	1
2	nil
3	10

in lua 5, table.foreachi(f,print) gives:
1	1

(I.E. it stops at the nil)

Is there a known way to get around this?

D.

-- 
Daniel Silverstone                               http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler          Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org               KeyId: 20687895
Your business will go through a period of considerable expansion.