一、将table.unpack语句与and、or、not等连用
local ext = {1, 2, 3}
print("正确结果:", table.unpack(ext))
print("错误结果:", ext and table.unpack(ext))
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
输出:
正确结果: 1 2 3
错误结果: 1
2023-11-30 17:26:04
local ext = {1, 2, 3}
print("正确结果:", table.unpack(ext))
print("错误结果:", ext and table.unpack(ext))
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
输出:
正确结果: 1 2 3
错误结果: 1