1.http://www.codingnow.com/2000/download/lua_manual.html
tt的扩展要用这个lua
LuaForWindows_v5.1.4-45.exe安装后
例子F:\soft\lua\examples>lua F:\soft\lua\examples\quickluatour.lua
2.http://pydoc.org/2.4.1/fcntl.html
原来fcntl在windows上用不了,悲催了,还用ubuntu吧
3.window运行lua,上googlecode上找luaforwindows
a=0
repeat
a=a+1
print(a)
until a==5
-------- Output -----
1
2
3
4
5
-- Count from 1 to 4 by 1.
for a=1,4 do io.write(a) end
print()
-- Count from 1 to 6 by 3.
for a=1,6,3 do io.write(a) end
-------- Output ------
1234
14
a={2}
table.insert(a,3);
table.insert(a,4);
table.sort(a,function(v1,v2) return v1 > v2 end)
for i,v in ipairs(a) do print(i,v) end
-------- Output ------
1 4
2 3
3 2
-- Example 38 --[[
To learn more about Lua scripting see
Lua Tutorials: http://lua-users.org/wiki/TutorialDirectory
"Programming in Lua" Book: http://www.inf.puc-rio.br/~roberto/pil2/
Lua 5.1 Reference Manual:
Start/Programs/Lua/Documentation/Lua 5.1 Reference Manual
Examples: Start/Programs/Lua/Examples
]]
-- Example 36 -- Standard Libraries - operating system facilities.
-- OS functions:
-- os.clock, os.date, os.difftime, os.execute, os.exit, os.getenv,
-- os.remove, os.rename, os.setlocale, os.time, os.tmpname
print(os.date())
-------- Output ------
07/12/11 00:34:36
http://myway84.iteye.com/blog/1025841
安装
make
看提示
在redhat上
make linux
make install就可以了