MikroElektronika PIC Microcontrollers PIC16 User Manual Page 92

  • Download
  • Add to my manuals
  • Print
  • Page
    / 172
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 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
Page view 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 171 172

Comments to this Manuals

No comments