Preprocessor Operators - mikroElektronika PIC Microcontrollers PIC12 User Manual

Mikroc user's manual
Table of Contents

Advertisement

mikroC
making it simple...
Note: There is also a third version of
assumes that neither
ing
#include macro_identifier
It assumes a macro definition exists that will expand the macro identifier into a
valid delimited header name with either of the
" header_name "

Preprocessor Operators

The
whitespace character on a line. Also,
merging during the preprocessor scanning phase.
Operator #
In C preprocessor, character sequence enclosed by quotes is considered a token
and its content is not analyzed. This means that macro names within quotes are not
expanded.
If you need an actual argument (the exact sequence of characters within quotes) as
result of preprocessing, you can use the
in front of a formal macro argument in definition in order to convert the actual
argument to a string after replacement.
For example, let's have macro
on LCD:
#define LCD_PRINT(val)
(note the backslash as a line-continuation symbol)
MikroElektronika: Development tools - Books - Compilers
nor
<
:
#include
formats.
(pound sign) is a preprocessor directive when it occurs as the first non-
#
mikroC - C Compiler for Microchip PIC microcontrollers
directive, rarely used, which
#include
appears as the first non-whitespace character follow-
"
< header_name >
and
perform operator replacement and
#
##
operator in macro body. It can be placed
#
for printing variable name and value
LCD_PRINT
Lcd_Out_Cp(#val ": "); \
Lcd_Out_Cp(IntToStr(val));
or
page
131

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents