88
Compiler
© 2008 Conrad Electronic
Msg_WriteInt(
42
);
// the answer to anything
}
Projects
A program can be separated into several files which are combined in a project (see
). In addition to these project files
can be added to the project which are able
to offer functions used by the program.
5.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
necessariliy 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.
Summary of Contents for C-Control Pro Mega Series
Page 1: ... 2008 Conrad Electronic C Control Pro Mega Series ...
Page 9: ...VIII Inhalt 2008 Conrad Electronic ...
Page 10: ...Part 1 ...
Page 17: ...Part 2 ...
Page 23: ...Part 3 ...
Page 41: ...32 Hardware 2008 Conrad Electronic 3 3 5 3 Component Parts Plan ...
Page 57: ...48 Hardware 2008 Conrad Electronic 3 4 5 3 Component Parts Plan ...
Page 58: ...Part 4 ...
Page 91: ...82 IDE 2008 Conrad Electronic ...
Page 92: ...Part 5 ...
Page 135: ...126 Compiler 2008 Conrad Electronic 31 1F US 63 3F 95 5F _ 127 7F DEL ...
Page 136: ...Part 6 ...
Page 231: ...Part 7 ...
Page 240: ......