gwyn@smoke.brl.mil (Doug Gwyn) (02/06/91)
In article <2293@inews.intel.com> bhoughto@hopi.intel.com (Blair P. Houghton) writes: >Digression: does anyone know where this style (having the >statements aligned with the braces that enclose them) came >from? Before a few months ago I'd never seen it, and now >I've seen it in a dozen programs. Who's fomenting this >bletcherous bowdlerization of my beloved C? Several programmers around here have come to use that style. The most logical indentation would be while ( ... ) { ... } but most agree that with 8-column tab stops this indents too far, thus while ( ... ) { ... } as an acceptable compromise. while ( ... ) { ... } is another form of compromise that is fairly often seen. while ( ... ) { ... } has little to recommend it other than being the style used in K&R. There are several other minor variations, including some that few programmers would find reasonable. There is no point in reopening this old style debate. You might ask yourself why you haven't been exposed to more variation in C coding style before now.