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


  Rule of writing   

  1. ..clause 1..: Token
  2. ..clause 2..: Free format
  3. ..clause 3..: Other rules

[1] Token

Japanese sentences : like the character, the word, the sentence, and the paragraph, etc.
It is possible to resolve it to various elements that compose sentences.
The program of C language can be similarly resolved.

When the program of C language is grammatically resolved, a minimum unit is a token.
In short, the token is a word. For instance, the program made for the start :.

 int main(void) {return 0;} 
When [deshitaga] and this of each token are resolved, it becomes the following.
[   Token division   ]
int
main
(
void
)
{
return
0
;
}
The reason to call the token a minimum unit is that the meaning changes when resolving any further.
It becomes impossible for the error to be displayed when return is resolved to ret urn, and to operate for instance.

It returns to contents.


[2] Free format

C language is a free format, that is, free format.
Because the writing of the program is hardly limited, it is possible to write by free writing.


[   Free format   ]
Writing that the limitation of the writing of the program is loosely, and is free can be done.
It is writing of the program of C language, and there is only one clear rule.
It is to tell it not to write the token mutually tying.
For instance, do not write the program made for the start in the nether way.
 intmain(void) {return 0;} 
In this example, with int It is a problem that main sticks.

However, there is an exception like understanding even if the program made for the start is seen, too.
It is to say that you may tie the sign and write.
()It tied and it wrote.

It is because it is possible to distinguish even if it connects because it is one character to which the sign is decided beforehand.
This is in every respect seen only the token named intmain for intmain.
However, if it is main(void), main, (), void, and [dearukoto] are obvious.

In the program of C language, the rule of writing is only this left.
Anyway, recognize it as long as it writes as tokens other than the sign do not tie.
It is possible to compile without trouble even by an extreme story and this program.

 
int main 
( 
void 
) 
{ 
return 0 
; 
} 

It returns to contents.


[3] Other rules

In C language, there is a rule of writing besides the rule explained ahead.
First of all, C language is to distinguish the capital letter and the small letter.
For instance, main, MAIN, and maIN are completely interpreted in C language as another token.
Therefore, take care about the difference of capital letters and small letters when you drive the program.

Moreover, in C language at the end of the sentence;It drinks and the sign is supposed to be written.
In the program ahead at the end of the return sentence;[Gatsukerareteimashita].
It becomes an error when this is forgotten, and take care.

The em-size character cannot be recognized by C language as one and notes.
Though the em-size character can be used for the character string etc. displayed on the screen
Input all programs by normal-width.


[ Trap in   double-byte space   ]
The mistake put when the program is described is a double-byte space.
Because the double-byte space is an em-size character, the mistake of the compiler is this.
When you use the text editor to which the double-byte space is not displayed
Where the mistake is found is not understood.

It returns to contents.


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