Properly used, white space in source code contributes significantly to its readability. However, lack of standard usages for white space can lead to confusing stylistic variations. The following guidelines are admittedly arbitrary, but adherence to them helps minimize distracting and essentially spurious variations in the appearance of the IPW source code.
White space is MANDATORY in the following circumstances:
White space is PROHIBITED in the following circumstances:
Blank lines are MANDATORY in the following circumstances:
Blank lines are PROHIBITED in the following circumstances:
Source lines that are too long must be broken by inserting a newline, after either a comma or a binary operator. The continuation line should be indented 1 space more than the immediately preceding "(", or 2 spaces more than the immediately preceding "=", as appropriate.
Examples:
printf("Usage:%s options . . .\\n ", progname); if (a < b && a > A_MAX) { ... } result = f(a) + f(a * b);
The use of embedded form-feed characters to paginate source code is discouraged: it is to easy to add or delete source lines without remembering to adjust the pagination, and readily-available tools exist to paginate C source code automatically.