lua-users home
lua-l archive

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


Hello,

-1- How does lua map keys to values?
More specifically, how does it keep the hash value constant when a key is modified:
t1 = {1,2,3}
t = {[t1]=1}
print (t[t1])	--> 1

t1[1] = 0
print (t[t1])	--> 1

What is the hash value based on?


-2- How often does it happen to mix indexed and key-ed values in a table?
(I mean in real-life programming.)


-3- How often does it happen to have string keys which are not kind of names?
(ditto)


-4- How often does it happen to have keys which are neither strings nore integers?
(ditto)


Denis
________________________________

la vita e estrany

http://spir.wikidot.com/