lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



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