
LUA
文章平均质量分 62
zhuoyuetec
这个作者很懒,什么都没留下…
展开
-
LUA io.input,io.output,io.write,io.read之间的关系
io.write(content)//输出内容,可以是字符串,函数,表达式等,不能使nil,例如 io.write("sin(30)=",math.sin(3.14/6)); 如果不设置io.output,io.write会输出到控制台 做如下设置 page=[[ An HTML Page LUA原创 2014-02-13 15:59:07 · 5858 阅读 · 0 评论 -
关于lua5.2中table.getn方法不能用的代替方案
lua5.0以上版本去除了table.getn方法,代替方案为 if string.find(_VERSION, "5.2") then table.getn = function (t) if t.n then return t.n else local n = 0原创 2014-03-26 16:55:16 · 5786 阅读 · 0 评论