Encyclopedia > 1TBS

  Article Content

One True Brace Style

Redirected from 1TBS

One True Brace Style is a style in writing computer programs in the C programming language, and its derivatives, like C++. Also known as K&R style, named after Kernighan and Ritchie, because the examples in their seminal book are formatted this way. Also called "kernel style" because the Unix kernel[?] is written in it. "One True Brace Style" (abbreviation 1TBS) is the name it was given by its partisans. The basic indent shown here is eight spaces (or one tab) per level; four spaces are occasionally seen, but are much less common.

For example

 if (cond) {
         <body>
 }

See also:

This article (or an earlier version of it) contains material from FOLDOC, used with permission. Update as needed.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Father Damien

... 10, 1873, at his request, he was permitted to travel to Molokai to help the lepers who had virtually nothing to keep them warm or fed. After twelve years of ministering ...

 
 
 
This page was created in 21.9 ms