Abl-electronic PIC Microcontrollers PIC16 Bedienungsanleitung Seite 132

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 312
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 131
Compound Statements (Blocks)
A compound statement, or block, is a list (possibly empty) of statements enclosed
in matching braces {}. Syntactically, a block can be considered to be a single
statement, but it also plays a role in the scoping of identifiers. An identifier
declared within a block has a scope starting at the point of declaration and ending
at the closing brace. Blocks can be nested to any depth up to the limits of memory.
For example,
for loop expects one statement in its body, so we can pass it a com-
pound statement:
for (i = 0; i < n; i++) {
int temp = a[i];
a[i] = b[i];
b[i] = temp;
}
Note that, unlike other statements, compound statements do not end with semi-
colon (;), i.e. there is never a semicolon following the closing brace.
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
124
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
Seitenansicht 131
1 2 ... 127 128 129 130 131 132 133 134 135 136 137 ... 311 312

Kommentare zu diesen Handbüchern

Keine Kommentare