85
C-Control Pro Mega Series
© 2008 Conrad Electronic
Conditional Compiling
#ifdef symbol
...
#else
// optional
...
#endif
It is possible to monitor which parts of the source texts are really being compiled. After a
#ifdef
symbol
instruction the following text is only compiled when
symbol
has also been defined by
#define
symbol
.
If there is an optional
#else
instruction then the source text will be processed after
#else
if the
symbol
has not been defined.
Insertion of Text
#include path\file name
By this instruction a text file can be inserted into the source code.
Because of some restrictions in the Preprocessor a path within a
#include
instruction must not
contain any blank characters!
5.1.2.1
Predefined Symbols
In order to ease the work with different versions of the C-Control Pro series there are a number of
definitions which are set depending on target system and Compiler project options. These constants
can be called up by
#ifdef,
#ifndef
or
#if
.
Symbol
Meaning
MEGA32
Configuration for Mega 32
MEGA128
Configuration for Mega 128
MEGA128CAN
Configuration for Mega 128 CAN Bus
__DEBUG__
Debug Data will be created
__MAPFILE__
A Memory Layout will be computed
The following constants contain a string. It is sensible to use them in conjunction with text outputs.
Symbol
Meaning
__DATE__
Current Date
__TIME__
Time of Compiling
__LINE__
Current Line in Sourcecode
__FILE__
Name of Current Source File
__FUNCTION__
Current Function Name
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: ......