Abl-electronic PIC Microcontrollers PIC16 Manual do Utilizador Página 140

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 312
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 139
Now, the following code,
LCD_PRINT(temp)
will be preprocessed to this:
Lcd_Out_Cp("temp" ": "); Lcd_Out_Cp(IntToStr(temp));
Operator ##
Operator
## is used for token pasting: you can paste (or merge) two tokens togeth-
er by placing ## in between them (plus optional whitespace on either side). The
preprocessor removes the whitespace and the ##, combining the separate tokens
into one new token. This is commonly used for constructing identifiers.
For example, we could define macro
SPLICE for pasting two tokens into one iden-
tifier:
#define SPLICE(x,y) x ## _ ## y
Now, the call SPLICE(cnt, 2) expands to identifier cnt_2.
Note: mikroC does not support the older nonportable method of token pasting
using
(l/**/r).
Conditional Compilation
Conditional compilation directives are typically used to make source programs
easy to change and easy to compile in different execution environments. mikroC
supports conditional compilation by replacing the appropriate source-code lines
with a blank line.
All conditional compilation directives must be completed in the source or include
file in which they are begun.
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
132
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Vista de página 139
1 2 ... 135 136 137 138 139 140 141 142 143 144 145 ... 311 312

Comentários a estes Manuais

Sem comentários