第5444页
-
Lua编程示例(七):协同程序基础逻辑
具体脚本如下:co=coroutine.create(function() print("hi") end) print(coroutine.status(co)) coroutine.resume(co) print(coroutine.status(co...
kavin 2018.05.19 2258浏览 0 -
Lua编程示例(六): C语言调用Lua函数
C++端:#include "stdafx.h" lua_State *L; void load_lua(lua_State **L,char *filename){ *L=luaL_newsta...
kavin 2018.05.19 2478浏览 0 -
Lua编程示例(五): C语言对Lua表的读取和添加
具体代码如下:#include "stdafx.h" lua_State *L; void load_lua(char *filename){ L=luaL_newstate(); luaL_op...
kavin 2018.05.19 2621浏览 0 -
Lua编程示例(四):Lua标准库之表库、字符串库、系统库
具体代码如下:tb1 = { "alpha","log","gamme"} print(table.concat(tb1," , ")) print(...
kavin 2018.05.19 2466浏览 0 -
Lua编程示例(三):稀疏表、双端队列、格式化输出、表和循环表的格式化输出
具体脚本如下:a={} for i=1,10 do a[i]={} for j=0,10 do if(i%2==0) then a[i][j]=0 end &nbs...
kavin 2018.05.19 2307浏览 0