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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 312
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 122
Statements specify the flow of control as a program executes. In the absence of
specific jump and selection statements, statements are executed sequentially in the
order of appearance in the source code.
Statements can be roughly divided into:
- Labeled Statements
- Expression Statements
- Selection Statements
- Iteration Statements (Loops)
- Jump Statements
- Compound Statements (Blocks)
Labeled Statements
Every statement in program can be labeled. Label is an identifier added before the
statement like this:
label_identifier
:
statement
;
There is no special declaration of a label – it just “tags” the statement.
Label_identifier
has a function scope and label cannot be redefined within
the same function.
Labels have their own namespace: label identifier can match any other identifier in
the program.
A statement can be labeled for two reasons:
1. The label identifier serves as a target for the unconditional goto statement,
2. The label identifier serves as a target for the
switch statement. For this
purpose, only case and default labeled statements are used:
case
constant-expression
:
statement
default :
statement
MikroElektronika:
Development
tools
-
Books
-
Compilers
115
page
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
STATEMENTS
Vista de página 122
1 2 ... 118 119 120 121 122 123 124 125 126 127 128 ... 311 312

Comentários a estes Manuais

Sem comentários