Untitled

Run Settings
LanguageLua
Language Version
Run Command
-- Meta class Shape = {area = 0} -- 基础类方法 new function Shape:new (o,side) o = o or {} setmetatable(o, self) self.__index = self side = side or 0 self.area = side*side; return o end -- 基础类方法 printArea function Shape:printArea () print("面积为 ",self.area) end -- 创建对象 myshape = Shape:new(nil,10) myshape:printArea()
Editor Settings
Theme
Key bindings
Full width
Lines