Download mikroElektronika PIC Microcontrollers PIC16 User`s manual

Transcript
mikroBASIC
mikroBASIC - Basic Compiler for Microchip PIC microcontrollers
making it simple...
Unit Influence on Scope (Visibility)
mikroBasic variables defined at the beginning of the module are global hidden
variables. When you declare an identifier at the beginning of a module, you cannot
use it outside the unit, but you can use it in any routine defined within the module.
Refer to chapter Scope (Variable Visibility) for more details.
Main Unit File
mikroBasic application has one main module file and none or more module files.
All source files have the same extension (pbas). Main file is identified by the keyword program at the beginning; other module files have the keyword module at
the beginning.
program Project1
include "additional.pbas"
dim tA as word
dim tB as word
main:
tA = sqrt(tb)
end.
Keyword include instructs the compiler which file to compile. If you want to
include a module, add the keyword include followed by the quoted name of the
file. The example above includes the module additional.pbas in the program
file.
page
56
MikroElektronika: Development tools - Books - Compilers