【发布时间】:2012-07-01 13:28:18
【问题描述】:
我刚开始使用 Lua,我想知道(因为我在网站上找不到)Lua 是否有 OR 运算符,就像其他语言中的 || 一样:
if (condition == true || othercondition == false) {
somecode.somefunction();
}
而在 Lua 中有
if condition then
x = 0
end
如何在 Lua 中编写一个 IF 块来使用 OR?
【问题讨论】:
标签: if-statement lua logic