MikroElektronika PIC Microcontrollers PIC16 Uživatelský manuál Strana 96

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 172
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 95
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
Compiler treats the construction like this:
if expression1 then
[ if expression2 then
statement1
else
statement2
end if ]
end if
To force the compiler to interpret our example the other way around, we would
have to write it explicitly:
if expression1 then
if expression2 then
statement1
end if
else
statement2
end if
if J <> 0 then
Res = I div J
end if
if j <> 0 then
i = i + 1
j = 0
end if
...
if v = 0 then
portb = por2
porta = 1
v = 1
else
portb = por1
porta = 2
v = 0
end if
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
91
page
Examples
Zobrazit stránku 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 171 172

Komentáře k této Příručce

Žádné komentáře