Options for Parentheses
Option 1: Spaces between inside and outside the parentheses.
if ( something )
...
Option 2: Spaces outside parentheses, no space inside.
if (something)
...
Option 3: Spaces inside parentheses, no space outside.
if( something )
...
Option 4: No white space.
if(something)
...
Options for braces
Option 1: Braces starting on control line.
if (something) {
// statements
}
Option 2: Braces starting on line under control line, non-indented.
if (something)
{
// statements
}
Option 3: Braces starting on line under control line, indented.
if (something)
{
// statements
}
Option 4: Braces starting on control line, closing brace indented.
if (something) {
// statements
}