I typically use the first if it's short and fits on one line. I choose between the latter two depending on the phase of the moon, or the number of times my cat purrs.if (condition && condition && condition) { ... } if (condition && condition && condition) { ... } if (condition && condition && condition) { ... }
Sometimes, I write:
if (condition && condition && and_a_very_long_condition) { ... }
In reply to Re: bloated 'if' formatting
by Perl Mouse
in thread bloated 'if' formatting
by eff_i_g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |