MikroElektronika PIC Microcontrollers PIC16 Instrukcja Użytkownika Strona 48

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 47
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
43
page
Comments are text that is added to the code for purpose of description or clarifica-
tion, and are completely ignored by the compiler.
' Any text between an apostrophe and the end of the
' line constitutes a comment. May span one line only.
It is a good practice to comment your code, so that you or anybody else can later
re-use it. On the other hand, it is often useful to comment out a troublesome part
of the code, so it could be repaired or modified later.
mikroBasic Code Editor features syntax color highlighting - it is easy to distin-
guish comments from the code due to different color, and comments are also itali-
cized.
dim teC as byte
' declare variable teC,
' variable type is byte
dim teB as byte
dim teA as byte
main:
teC = 12
' assign value 12 to variable C
if teA > 0 then
teC = 9
else
teA = teB
end if
' you can also comment out part of the
' code you don't want to compile:
' E = gosub pr_function(1,2)
' This function call won't be compiled
end.
COMMENTS
Example
Przeglądanie stron 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag