|
http://www.jindent.com |
Previous: White Spaces
|
Next: Templates
|
| Misc Operators |
| Padding assignment operators = += -= /= *= ... |

|
int·x·=·y-1; |
|
int·x=y-1; |
| Padding conditional operators && || |

|
BOOLEAN·b·=·condition1·&&·(condition2·||·condition3); |
|
BOOLEAN·b·=·condition1&&(condition2||condition3); |
| Padding equality operators == != |

|
BOOLEAN·b·=·(value1·==·value2)·||·(value3·!=·value4); |
|
BOOLEAN·b·=·(value1==value2)·||·(value3!=value4); |
| Padding relational operators < > <= => |

|
BOOLEAN·b·=·(value1·<·value2)·||·(value3·=>·value4); |
|
BOOLEAN·b·=·(value1<value2)·||·(value3=>value4); |
| Padding additive operators + - |

|
int·value·=·a·+·b·-·c; |
|
int·value·=·a+b-c; |
| Padding multiplicative operators * / % |

|
float·value·=·a·*·b·/·c; |
|
float·value·=·a*b/c; |
| Padding bitwise operators & | ^ |

|
int·value·=·a·&·255·|·b; |
|
int·value·=·a&255|b; |
| Padding shift operators << >> |

|
BYTE·value·=·a·<<·3; |
|
BYTE·value·=·a<<3; |
| Padding input/output operators << >> |

<< and >>.|
cout·<<·"some·text"·<<·endl; |
|
cout<<"some·text"<<endl; |
| Space before bangs ! |

|
if(·!(x·==·3)){ callMethodC(); } |
|
if(!(x·==·3)){ callMethodC(); } |
| Space after bangs ! |

|
if(!·(x·==·3)){ callMethodC(); } |
|
if(!(x·==·3)){ callMethodC(); } |
| Space before bangs ! appearing together with && || |

&&)/or (||) conditions or not.|
if(((w==y)·||·!(w>=0))·&&·!(w<y))·{· ... } |
|
if(((w==y)·||!(w>=0))·&&!(w<y))·{· ... } |
| Space after bangs ! appearing together with && || |

&&)/or (||) conditions or not.|
if(((w==y)·||!·(w>=0))·&&!·(w<y))·{· ... } |
|
if(((w==y)·||!(w>=0))·&&!(w<y))·{· ... } |
| Space before tildes ~ |

|
BYTE·u·=·~1; |
|
BYTE·u·=~1; |
| Space after tildes ~ |

|
BYTE·u·=·~1; |
|
BYTE·u·=·~·1; |
| Pointer Operators |
| Padding pointer operators -> |

->.|
myObject·->·getValue(); |
|
myObject->getValue(); |
| Space before reference operators & in types |

|
TYPE·&·name; |
|
TYPE&·name; |
| Space after reference operators & |

|
callMethod(&·value); |
|
callMethod(&value); |
| Space before dereference operators * in types |

|
CBrush·*·value; ... value·=·(CBrush·*)·pDC·->·SelectStockObject(NULL_BRUSH); |
|
CBrush*·value; ... value·=·(CBrush*)·pDC·->·SelectStockObject(NULL_BRUSH); |
| Space after dereference operators * |

|
callMethod(*value); |
|
callMethod(*·value); |