You should note that the ternary operator and if-then-else don't do the same thing. The ternary operator is an operator, intended to return a value (which can be assigned, tested, or further operated upon). If-then-else executes one of two alternate blocks.
In reply to Re^2: in search of a more elegant if then else
by Xiong
in thread in search of a more elegant if then else
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |