Quote:
Originally posted by jeffro
This may just be me but I only use brackets when I have more than one command or statement in an if block. Travis' style is correct but, if there are only 2 outcomes for the if block (true|false). If that is the case, why not just use this style?
|
Ternary Operators are used to give variable a value, It returns
a certain value, You can't really use it to execute, For example
functions.
Epsilon, Your alternative is good but you can get problems when
you have to for example excute a long function and have an else
in it, Becomes fairly long then.