Abl-electronic PIC Microcontrollers PIC16 Manuel d'utilisateur Page 57

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 312
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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...
Vue de la page 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 311 312

Commentaires sur ces manuels

Pas de commentaire