Instructions

169 C-Control Pro IDE
© 2013 Conrad Electronic
txt=__LINE__;
Msg_WriteText(txt); // Issue Line Number
Msg_WriteChar(13); // LF
txt=__FILE__;
Msg_WriteText(txt); // Issue File Number
Msg_WriteChar(13); // LF
txt=__FUNCTION__;
Msg_WriteText(txt); // Issue Function Name
Msg_WriteChar(13); // LF
4.1.2 Pragma Instructions
By use of the #pragma instruction output and flow of the Compiler can be controlled. The following
commands are authorized:
#pragma Error "xyz..."
An error is created and text "xyz..." is issued
#pragma Warning "xyz..."
A warning is created and text "xyz..." is issued
#pragma Message "xyz..."
The text "xyz..." is issued by the Compiler
Example
These #pragma instructions are often used in conjunction with Preprocessor commands and Pre-
defined Constants. A classical example is the creation of an error message in case specific hard-
ware criteria are not met.
#ifdef MEGA128
#pragma Error "Counter Functions not with Timer0 and Mega128"
#endif
4.1.3 Map File
If during compilation a Map File has been generated then the memory size of the used variable can
there be ascertained.
Example
The project CNT0.cprj generates the following Map File during compilation:
Global Variable Length Position (RAM Start)
---------------------------------------------------------------
Total Length: 0 bytes
Local Variable Length Position (Stack relative)
-----------------------------------------------------------------
Function Pulse()
count 2 4
i 2 0