MikroElektronika PIC Microcontrollers PIC16 Manual de usuario Pagina 92

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 172
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 171 172

Comentarios a estos manuales

Sin comentarios