Japanese sentences : like the character, the word, the sentence, and the paragraph, etc.
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 :.
When [deshitaga] and this of each token are resolved, it becomes the following.int main(void) {return 0;}
[ Token division ]The reason to call the token a minimum unit is that the meaning changes when resolving any further.
int
main
(
void
)
{
return
0
;
}
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.
It is writing of the program of C language, and there is only one clear rule.
[ Free format ]
Writing that the limitation of the writing of the program is loosely, and is free can be done.
In this example, with int It is a problem that main sticks.intmain(void) {return 0;}
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 ; }
In C language, there is a rule of writing besides the rule explained ahead.
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.