lua select 用法
来源:互联网 发布:删除sql server 2008 编辑:程序博客网 时间:2024/05/17 23:01
调用select时,必须传入一个固定实参selector(选择开关)和一系列变长参数。如果selector为数字n,那么select返回它的第n个可变实参,否则只能为字符串"#",这样select会返回变长参数的总数。例子代码:
do
function foo(...)
for i = 1, select('#', ...) do //get the count of the params
local arg = select(i, ...);//select the param
print("arg", arg);
end
end
foo(1, 2, 3, 4);
end
0 0
- lua之select用法
- Lua -- select用法
- lua select 用法
- lua之select用法
- lua的select操作
- Lua中的select("#", ...)
- lua [[ ]] 用法
- select用法
- select()用法
- select()用法
- select()用法
- select用法
- select 用法
- select用法
- select用法
- select 用法
- select用法
- select 用法
- ListView嵌套出现子Listview显示不全问题解决
- Android Studio "nativeLibraryDirectories=[/data/app/com.lukouapp-1/lib/arm64, /vendor/lib64, /system
- Arduino简单实例之八_蓝牙模块
- 在JSP里使用CKEditor和CKFinder
- 跨平台获取cpu核心数
- lua select 用法
- select2 4.0.3 空记录时的处理
- 浅论软件测试工程师
- Android网络状态监听
- 类和对象及方法的的初步认识
- jqgrid动态显示隐藏列,同时自动调整表格宽度
- java并发编程入门:synchronized 与 Lock 的那点事
- 整合CKEditor和CKFinder(for java)
- python的strip(),lstrip()和rstrip()