MikroElektronika PIC Microcontrollers PIC16 Fiche technique Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 194
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
Programming PIC Microcontrollers in BASIC - mikroElektronika
end.
4.1.2 SELECT..CASE Statement – Conditional multiple program
branching
Syntax
select case Selector
case Value_1
Statements_1
case Value_2
Statements_2
...
case Value_N
Statements_n
[ case else
Statements_else ]
end select
Description Select Case statement is used for selecting one of several available branches in the
program course. It consists of a selector variable as a switch condition, and a list
of possible values. These values can be constants, numerals, or expressions.
Eventually, there can be an else statement which is executed if none of the labels
corresponds to the value of the selector.
As soon as the Select Case statement is executed, at most one of the statements
statements_1 .. statements_n will be executed. The Value which matches the
Selector determines the statements to be executed.
If none of the Value items matches the Selector, then the statements_else in the
else clause (if there is one) are executed.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/04.htm (4 sur 9)05/11/2004 02:15:36
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 193 194

Commentaires sur ces manuels

Pas de commentaire