Content deleted Content added
Spell checker - Using UK english |
|||
Line 12:
The basic level of indentation puts the curly brackets on one line, indenting them two spaces in. The statement(s) after the brackets are indented four spaces in.
For a function, the curly brackets should be on the first line, on
Statements such as the '''if''' statement should be styled like this:
Line 28:
'''do-while''' statements should be written like this:
do
{
foo(bar);
Line 36:
== Variable Declaration ==
Variables are declared each on one line, or two of the same sort on one line. The former is
Examples:
Line 52:
bar;
is not permitted under the
== Comments ==
Based on the standard, all comments should be in [[English_language|English]]. Each comment should have basic punctuation, but if a lower case identifier comes in the start of a sentence, one is not meant to capitalise it.
According to the standard, a brief comment at the top should explain the program use. This comment should be at the top of the source file containing the main() function.
Comments should also be at the top of functions, explaining what they do and what arguments they
The standard determines that there is no need to re-state the name of the function, the reader can see it for his or her self.
Every '''#endif''' should have a comment, explaining the condition that is being ended and its sense.
The standard asks that when a programmer enters a comment, the standard asks that two spaces are put on the end of the sentence so that the Emacs sentence commands work.
Line 80:
According to the standard, portability problems are very limited as GNU programs are designed to be compiled with one compiler, the GNU C Compiler and only run on one system, which is the GNU system.
There is one form of portability problem though, and that is the fact that the standard makes it clear that a program should run on different CPU types. The standard says that GNU doesn't and won't support 16 bit types, but handling all the different 32 and 64 bit types is
== External links ==
|