mikroC
mikroC - C Compiler for Microchip PIC microcontrollers
making it simple...
The following syntax is used to define a macro with parameters:
#define macro_identifier(<arg_list>) token_sequence
Note there can be no whitespace between the macro_identifier and the “(”. The optional arg_list is a sequence of identifiers separated by commas, not unlike the argument list of a C function. Each
Such macros are called by writing
macro_identifier(<actual_arg_list>)
in the subsequent source code. The syntax is identical to that of a function call; indeed, many standard library C “functions” are implemented as macros. However, there are some important semantic differences.
The optional actual_arg_list must contain the same number of
A macro call results in two sets of replacements. First, the macro identifier and the
page |
|
128 | MikroElektronika: Development tools - Books - Compilers |
|