Datasheet
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










