找回密码
 立即注册
查看: 265|回复: 0

[简易教程] 打印lua表,如何打印lua表

[复制链接]
发表于 2022-2-23 16:34 | 显示全部楼层 |阅读模式
https://stackoverflow.com/questi ... -a-table-to-console
https://github.com/kikito/inspect.lua/blob/master/inspect.lua
local inspect = require('inspect')

print(inspect({1,2,3})) -- {1, 2, 3}
print(inspect({a=1,b=2})
-- {
--   a = 1
--   b = 2
-- }
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-6 12:01 , Processed in 0.093336 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表