1. Userdata basic
amp;quot;There are eight basic types in Lua: nil, boolean, number, string, userdata, function, thread, and table.
The type() function gives the type name of any given value. a ...……
一. c++ 调用lua
1. lua文件
str = amp;quot;I am learning lua!amp;quot;
tbl = {name = amp;quot;shunamp;quot;, id = 20200501}
function add(a,b)
return a + b
end
/////////////////////////////// ...……
这个库通过表os实现os.clock ()功能:返回一个程序使用CPU时间的一个近似值
例如:local x = os.clock();print(os.clock())local s = 0;for i = 1, 100000000 do s = s + i;endprint(string.format(amp;qu ...……
CE递归遍历主界面控件
local fnGetSpace = function(n)
local ret = amp;quot;amp;quot;
for i = 1,n do
ret = (ret .. amp;quot;-amp;quot;)
end
return ret
end
enum_ui = function(ui, ...……