< previous page page_256 next page >

Page 256

if (cond)
{
body
}

Whitesmiths style popularized by the examples that came with Whitesmiths C, an early commercial C compiler. Basic indent per level shown here is eight spaces, but four spaces are occasionally seen.
if (cond)
{
body
}

GNU style Used throughout GNU EMACS and the Free Software Foundation code, and just about nowhere else. Indents are always four spaces per level, with {and} halfway between the outer and inner indent levels.
if
(cond)
{
body
}

Surveys have shown the Allman and Whitesmiths styles to be the most common, with about equal mind shares. K&R/1TBS used to be nearly universal, but is now much less common (the opening brace tends to get lost against the right paren of the guard part in an if or while, which is a Bad Thing). Defenders of 1TBS argue that any putative gain in readability is less important than their style's relative economy with vertical space, which enables one to see more code on one's screen at once. Doubtless these issues will continue to be the subject of holy wars.
index n. See coefficient of X.
infant mortality n. It is common lore among hackers (and in the electronics industry at large; this term is possibly techspeak by now) that the chances of sudden hardware failure drop off exponentially with a machine's time since first use (that is, until the relatively distant time at which enough mechanical wear in I/O devices and thermal-cycling stress in components has accumulated for the machine to start going senile). Up to half of all chip and wire failures happen within a new system's first few weeks; such fail-

 
< previous page page_256 next page >

If you like this book, buy it!