Lua 语言输出Table详细信息的实现
来源:互联网 发布:淘宝联盟淘客贷款 编辑:程序博客网 时间:2024/05/21 15:47
function PrintTable(tbl, f, bShowSquare) if type(f) ~= "function" and f ~= nil then error("The second argument %s should be a function", tostring(f)) end if type(b) ~= "boolean" and b ~= nil then error("The third argument %s should be a boolean", tostring(b)) end p = f or io.write bShowSquare = bShowSquare or false if type(tbl) == "number" or type(tbl) == "function" or type(tbl) == "boolean" or type(tbl) == "nil" then p(tostring(tbl)) elseif type(tbl) == "string" then p(string.format("%q",o)) elseif type(tbl) == "table" then p("{\n") for k,v in pairs(tbl) do if bShowSquare then p("[") end PrintTable(k, p, b) if bShowSquare then p("]") end p(" = ") PrintTable(v, p, b) p(",\n") end p("}") endend
0 0
- Lua 语言输出Table详细信息的实现
- Lua中实现table的打印输出(print table)
- lua 如何输出树状结构的table?
- lua递归输出表table的内容
- 关于lua table的实现
- 关于lua table的实现
- Lua里实现将Table转为String输出,Debug神器
- Lua语言中的table
- mysql 输出表的详细信息详解 show table status like '表名'
- mysql 输出表的详细信息 show table status like '表名'
- Lua用闭包实现的table迭代器
- lua的table实现以及遍历方式
- Lua中table类型的源码实现
- lua Table的插入简单实现
- Lua中table类型的源码实现
- lua数据结构之table的内部实现
- 自己实现lua table
- lua输出arg参数的函数(lua语言)
- hive大数据倾斜总结
- 杰克琼斯 - 杭州 门店地址 电话
- 多线程编程 实战篇 (二)
- web前端开发需要学习什么内容已经需要使用什么开发工具?
- 动态规划之Bellman-Ford最短路径
- Lua 语言输出Table详细信息的实现
- 【数据库】SQL注入攻击
- Win7系统快速定位照片及快速查找文档
- Triangle
- 查找数组中第二个最小元素
- ASP.NET MVC5(3)数据从控制器传递给视图
- java基础
- CSR 8670 开启 GAIA 编译 BLUELIB
- 无约束最优化方法学习笔记