lua-users home
lua-l archive

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


I think there are two problems that make a and b or c have trouble:

1. As noted, it doesn't actually work if b can be a false value, so it's an imperfect substitute for the ternary operator.

2. It relies on "and" having higher precedence than "or" which it does but you have to remember that when reading the code.

Mark