Dare I introduce the following? if(blah) { code ... code... } else { code... code... } GB ----- Original Message ----- From: "Mike Mansheim" To: Sent: Wednesday, January 08, 2003 9:18 AM Subject: [OT]: C syntax > I used [OT] to be safe - could this have been [PIC] or [EE]? > > I've always formatted if/while/for, etc. C blocks like this: > > if (blah) > { > code... > code... > } > > but a newer guy here does this: > > if (blah){ > code... > code... > } > > It seems this is what is being taught now. The first way makes it so > clear what code goes with what set of braces that the second way really > bugs me! Why is it used?? I'm sure there are folks on the list that > use it that could tell me. > My guess would be to save that one line - but, in that case, why not put > the ending brace on the same line as the last line of code? -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics