Talk:IfElse
Jump to navigation
Jump to search
There's not really any use for this, as far as i can tell. Lua supports this by its syntax sugars:
moo = (variable) and (ifTrue) or (ifFalse)
works the same as
moo = (varible) ? ifTrue : ifFalse
in C++.
oO You're right. Never thought of that. What I was thinking about, too, was something like
moo = ({ [true] = ifTrue, [false] = ifFalse })[condition]
But your code is much better. Thanks for posting this. ;D NeonBlack 22:00, 18 May 2009 (CEST)