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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 312
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 56
Braces
Braces { } indicate the start and end of a compound statement:
if (d == z) {
++x;
func();
}
The closing brace serves as a terminator for the compound statement, so a semi-
colon is not required after the }, except in structure declarations. Often, the semi-
colon is illegal, as in
if (statement)
{ ... }; /* illegal semicolon! */
else
{ ... };
For more information, refer to Compound Statements.
Comma
The comma (,) separates the elements of a function argument list:
void func(int n, float f, char ch);
The comma is also used as an operator in comma expressions. Mixing the two
uses of comma is legal, but you must use parentheses to distinguish them. Note
that (
exp1, exp2) evalutates both but is equal to the second:
/* call func with two args */
func(i, j);
/* also calls func with two args! */
func((exp1, exp2), (exp3, exp4, exp5));
MikroElektronika:
Development
tools
-
Books
-
Compilers
49
page
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
Vista de página 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 311 312

Comentários a estes Manuais

Sem comentários