在用lua写脚本的过程中,遇到过几个点,记录一下:
local string1 = amp;quot;ef359b44-416d-495b-b102-2baedbc6d12aamp;quot;
local res = string.gsub(string1, amp;quot;-amp;quot;,amp;quot;amp;quot;)
print ...……
a meta table has a __name attr whose value is name of metatable
a meta table is stored in LUA_REGISTRYINDEX whose key is its name
Code analysis
Appl
DUMP_STACK(L);
/*{ amp;quot;fooamp;quot;, amp;quot ...……
5 Lua for Windows
5.1 Lua for Windows
Lua for Windows是Windows上Lua脚本语言的环境配置;
Lua for Windows(LfW)将Lua二进制文件、Lua库文件和支持Lua的编译器组合在一个Microsoft Windows操作系统的开发工具;
5 ...……
lua里面函数是first-class function,这样就显得lua的函数跟C/C++里面不太一样.
local function print()--code hereend--其实就是local print = function () --匿名函数--code hereend
因为函数是first-class fun ...……
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, ...……