lua-users home
lua-l archive

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


Hi,

I have two little questions that I hope you'll be able to answer :

- When a create an table and then make a copy of it :

local table = { }
second = table

Does a change on table will be propagated to second ?

- When I see this :

local table = { }

function table.test ()
 print("Mooh !")
end

Does it creates a function test inside the table 'table' ?

Thanks,
- Sam
--
Maxime Petazzoni - sam@bulix.org - http://www.bulix.org
Gobelins' core team leader       - http://gobelins.nekeme.net
GPG fingerprint: D694 DAB9 8F4E 68A8 4C17  F011 ECAB 0E7B 83E6 AE0D
Jabber: sam@jabber.dk ICQ: 100551837 AIM: maximepetazzoni

Attachment: signature.asc
Description: OpenPGP digital signature