lua-users home
lua-l archive

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


Can someone confirm if the following code shows a bug? If not can someone explain how Lua handles  embedded tables?

 

 

a={}

b={}

 

a.a1=1

b.b1=a

 

-- add next line will fix it

--a={}

 

a.a1=2

b.b2=a

 

print (b.b1.a1 .. " should be 1")

print (b.b2.a1 .. " should be 2")

 

 

 

**************************************************************************************** Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. ****************************************************************************************