※スタイルシート未対応ブラウザではレイアウトを正確に再現できません。
  > | advanced by | contents  | that returns in <    
                   < [modosusu] > Color magazine monochrome light and shade   font predetermined, Gothic Ming-style type longhand   size Konaka large   standard  


  Custom of writing   

  1. ..clause 1..: Writing of function
  2. ..clause 2..: Indent
  3. ..clause 3..: Comment

[1] Writing of function

Though C language is a free format as explained in the foregoing paragraph
However, if everyone is doing various writing, it becomes difficult to read the program.
Therefore, the custom of writing is provided to some degree.

The program made for the start packed everything in one line.

 int main(void) {return 0;} 
Needless to say, this writing is a bad program of manners not read easily.
The function is generally assumed that you should do the following writing.
 int main(void)  
{
	return 0;
}
If such writing is done, the start and the end of the function become comprehensible.

It returns to contents.


[2] Indent

Let's see the program ahead again.
 int main(void)  
{
	return 0;
}
I think that it is understood that the return sentence swerves to the right.
This is feature writing of C language that is called an indent.

[   Indent   ]
Method of moving to the right to express hierarchy and writing
The indent is used to express a hierarchical structure.
A little moving to the right is a custom in C language in the sentence of the enclosure.
At this time, it is a custom to use tab (Tab) key for moving to the right.
Do not make the space from space but move it with TAB key.

When you use the development setting and the text editor recent
Input..stage..automatic..indent..do..function..attach.
It might be easy and be good to make them automatically apply it by using such an editor if possible.


[ Do   easiness   ].
The most important thing for the programmer is to do easiness.
Anyway, the computer should put everything by making it to the computer.
The chore must be left to the computer, and man must work on more creative work.

It returns to contents.


[3] Comment

Though the content is understood at once if it sees if it is an easy program
The content is not understood only from glancing when becoming a complex program.
If the explanation is put in the program, the program becomes legible.

The function to put the explanation in the program is provided in C language, and this is called a comment.


[   Comment   ]
Explanation written in program. There is no influence in the operation of the program at all.
In C language, it is possible to comment by placing it by /**/ between those.
This comment doesn't influence the execution of the program at all.
 int main(void) 
{
	/* Here comments */  
	Return 0;
}
The explanation can be buried by doing in this manner in the program.
The comment doesn't influence the operation of the program at all though it repeats.

The comment can be written in the line it writes in two or more lines, and with the program.

 int main(void) 
{
	/* All it is possible to come 
	are the comments on this. 
	*/ 
	return 0; /* Here is a comment */. 
}
There are no custom of especially uniting it etc. about the writing of the comment.
There is a person who writes a random comment, and is a person who writes the chocolate chocolate.
However, not writing the comment at all becomes a problem in a large-scale program.
Actually, there are a lot of forgetting the content of the program written for myself.

Apply the comment to a necessary part in the program explains on the site in the future.
You also think that you should apply the comment to the program that I write.

It returns to contents.


< - It is advanced -> | in | head that returns  to returning  next |.