Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Spaces between control structures and parens.

Name: Anonymous 2010-03-04 11:13

i.e, if(x) { /* blah */ } vs. if (x) { /* blah /* }. I never understood why anyone would use the second style, it's not like it makes the code substantially easier to read (in fact, I think it's aesthetically worse and more distracting), and it wastes line capacity.

Name: Anonymous 2010-03-04 13:22

This thread is full of fucking 13 year old shit people. Why has nobody even named a coding style yet? K&R for life

if(x)
error: line 1: expected SEP

>>7
Perhaps toy examples like that, but for actual expressions I will refer you to:
>>10
but ignore:
decimal points/other things that could be mistaken as a comma

Try also (with reasoning):
if (x) { /* syntax highlighting does not leave 'if' unnoticed, even when set apart from the condition */
  if ( long && expression && here ); /* Spaces keep parentheses separate from each part of the condition, try also putting each part on a separate line indented the same amount */
}
function (butt); /* here you are doing 'function' to 'butt' */
many_params( "suck my shit", 0, 6, NULL ); /* here you are taking these many things and putting them into 'many_params', the immediate open parenthesis denotes its role as function; notice also comma, space as in written language */

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List