跳到主要内容

zm.Type 获取数据类型

🎯功能​

获取参数的数据类型。

📜语法​

结果 = zm.Type(数据)

📥参数​

参数数据类型解释
数据任意类型等待获取数据类型的参数。

📤返回​

字符串 ,返回以下几种可能值: "null"(一个字符串,而不是 null 值), "number", "string", "boolean", "table", "function", "thread", "userdata"。

💡示例​

Import "zm.luae" //导入插件,只需执行一次
zm.Init //初始化插件,只需执行一次

TracePrint zm.Type(null)
TracePrint zm.Type(345911220)
TracePrint zm.Type("紫猫")
TracePrint zm.Type({1,2,3})
TracePrint zm.Type(true)

📘备注​