Indent Style - Horstmann Style

Horstmann Style

The 1997 edition of Computing Concepts with C++ Essentials by Cay S. Horstmann adapts Allman by placing the first statement of a block on the same line as the opening brace.

while (x == y) { something; somethingelse; //... if (x < 0) { printf("Negative"); negative(x); } else { printf("Non-negative"); nonnegative(x); } } finalthing;

This style combines the advantages of Allman by keeping the vertical alignment of the braces for readability and easy identification of blocks, with the saving of a line of the K&R style. However the 2003 edition now uses Allman style throughout.

Read more about this topic:  Indent Style

Famous quotes containing the word style:

    Sometimes among our more sophisticated, self-styled intellectuals—and I say self-styled advisedly; the real intellectual I am not sure would ever feel this way—some of them are more concerned with appearance than they are with achievement. They are more concerned with style then they are with mortar, brick and concrete. They are more concerned with trivia and the superficial than they are with the things that have really built America.
    Lyndon Baines Johnson (1908–1973)