User`s manual
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