|
http://www.jindent.com |
Previous: Line Wrapping
|
Next: Declarations
|
| Conditional operators: && || |

|
if (conditionA() && conditionB() | && conditionC() && conditionD()) | { | ... | } | |
|
if (conditionA() && conditionB() && | conditionC() && conditionD()) | { | ... | } | |
| Wrap conditional expressions |

|
if ((condition1 && condition2) || (condition3 && condition4) ||!(condition5 && condition6)) { callMethod(); | } | |
|
if ((condition1 && condition2) || (condition3 && condition4) | ||!(condition5 && condition6)) { | callMethod(); | } | |
|
if ((condition1 && condition2) | || (condition3 && condition4) | ||!(condition5 && condition6)) { | callMethod(); | } | |
|
if ((condition1 && condition2) | || (condition3 && condition4) | ||!(condition5 && condition6)) { | callMethod(); | } | |
| Comparison operators: < > == != ... |

|
if (functionA(a, b, c, d, e) | < functionB(f, g, h, i, j)) | { | ... | } | |
|
if (functionA(a, b, c, d, e) < | functionB(f, g, h, i, j)) | { | ... | } | |
| Numerical operators: + - * / % & | << >> ... |

|
x = (y * 100) + 42 | + (100 - z); | |
|
x = (y * 100) + 42 + | (100 - z); | |
| Wrap after assignments = on demand |

|
if (x == 0) | { | myNewValue = | new aVeryLongConstructorWhichIsNotEasyToWrap(); | } | |
|
if (x == 0) | { | myNewValue = new aVeryLongConstructorWhichIsNotEasyToWrap(); } | |