摘要: Lua中的table就是一种对象,即它拥有状态、拥有独立于其值的标识(self)、table与对象一样具有独立于创建者和创建地的征集周期 什么叫对象拥有独立的生命周期? Account = {balance = 0}function Account.withdraw(v) Account.balance = Acount.balance-vend--则可进行如下调用Account.... 阅读全文
posted @ 2013-11-22 16:03 瓜蛋 阅读(1220) 评论(0) 推荐(0) 编辑