MikroElektronika PIC Microcontrollers PIC16 Instrukcja Użytkownika Strona 92

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 91
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
Conditional statements control which part(s) of the program will be executed,
depending on a specified criteria. There are two conditional statements in
mikroBasic:
SELECT CASE statement,
IF statement.
We suggest browsing the chapters Relation Operators and Implicit Conversion and
Relation Operators, if you have not done so already.
Labels represent a more clear-cut way of controlling the program flow. You can
declare a label below variables declarations, but you cannot declare two labels
under the same name within the same routine. Name of the label needs to be a
valid identifier. Multiple label declarations in single line are not allowed.
Goto statement jumps to the specified label unconditionally, and the program exe-
cution continues normally from that point on.
Here is an example:
program test
dim jjj as byte
main:
' some instructions ...
goto myLabel
' some instructions...
myLabel:
' some instructions...
end.
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
87
page
CONDITIONAL STATEMENTS
Labels and Goto
Przeglądanie stron 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag