Instructions
171 C-Control Pro IDE
© 2013 Conrad Electronic
4.2.2 Instructions
Instruction
An instruction consists of several reserved command words, identifiers and operators and is at the
end terminated by a semicolon (';'). In order to separate various elements of an instruction there are
spaces in between the instruction elements which are called "Whitespaces". By “spaces“ space
characters, tabulators and line feeds ("C/R and LF") are meant. It is of no consequence whether a
space is built by one or several "Whitespaces".
Simple Instruction:
a= 5;
An instruction does not necessarily have to completely stand in one line. Since line feeds do
also belong to the space category it is legitimate to separate an instruction across several lines.
if(a==5) // instruction across 2 lines
a=a+10;
Instruction Block
Several instructions can be grouped into a block. Here the block is opened by a left tailed bracket
("{"), followed by the instructions and closed at the end by a right tailed bracket ("}"). A block does
not necessarily have to be terminated by a semicolon. I. e., if a block builds the end of an instruction
then the last character in the instruction will be the right tailed bracket.
if(a>5)
{
a=a+1; // instruction block
b=a+2;
}
Comments
There are two types of commentaries, which are the single line and the multi line commentaries. The
text within commentaries is ignored by the Compiler.
Single line commentaries start with "//" and end up at the line’s end.
Multi line commentaries start with "/*" and end up with "*/".
/* a
multi line
commentary */
// a single line commentary