Re: orif
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: orif
- From: tobias@...
- Date: 2015年8月14日 20:29:13 +0200
Quoting "Soni L." <fakedme@gmail.com>:
With orif:
```lua
local flag = false
if i == 1 then
flag = true
orif i == 2 then -- explicit fallthrough
print(flag)
else -- default
print "Unknown!"
end
```
Lua has elseif which is I think exactly the same:
local flag = false
if i == 1 then
flag = true
elseif i == 2 then -- explicit fallthrough
print(flag)
else -- default
print "Unknown!"
end
Regards,
Tobias