THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/06/2010 at 16:06, xxxxxxxx wrote:
Is there any benefit over doing an if statement like this?
x == 10 ? y = 16 : y = 5;
as opposed to
if (x = 10)
y = 16;
On 09/06/2010 at 02:27, xxxxxxxx wrote:
The only real benefit is that it's shorter. You can also use the ? operator in function calls.
MyFunction(x == 10 ? 16 : 5);
if (x == 10)