lua-users home
lua-l archive

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


How about
x = a > 1 ? b > 1 : c > 1
?

On 13.04.2010 21:41, Francisco wrote:
very compact!
x=(vXSTX>vXSX or vXSTX>vXSY) and vXSX+vXSTX or vXSX

2010/4/12 Klaus Ripke<paul-lua@malete.org>:
On Mon, Apr 12, 2010 at 05:24:44PM -0700, Sam Roberts wrote:
I was pretty happy when I finally found out that "x and y or z" was
essenttially "x ? y : z", maybe Cynthia is, too.
... but do not forget that "true and false or 22" is 22, not false.
This may hurt especially where z must not be evaluated if x.





--

___________________________________________
Best regards,
Sergey Rozhenko                 mailto:sergroj@mail.ru