mikroElektronika PIC Microcontrollers PIC12 User Manual page 45

Mikroc user's manual
Table of Contents

Advertisement

mikroC
making it simple...
Comments
Comments are pieces of text used to annotate a program, and are technically
another form of whitespace. Comments are for the programmer's use only; they
are stripped from the source text before parsing. There are two ways to delineate
comments: the C method and the C++ method. Both are supported by mikroC.
C comments
C comment is any sequence of characters placed after the symbol pair
comment terminates at the first occurrence of the pair
The entire sequence, including the four comment-delimiter symbols, is replaced by
one space after macro expansion.
In mikroC,
int /* type */ i /* identifier */ ;
parses as:
int i;
Note that mikroC does not support the nonportable token pasting strategy using
/**/
C++ comments
mikroC allows single-line comments using two adjacent slashes (
ment can start in any position, and extends until the next new line. The following
code,
int i;
int j;
parses as:
int i;
int j;
MikroElektronika: Development tools - Books - Compilers
. For more on token pasting, refer to Preprocessor topics.
// this is a comment
mikroC - C Compiler for Microchip PIC microcontrollers
. The
/*
following the initial
*/
). The com-
//
.
/*
page
37

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