User`s manual
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.
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 key-
word 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.
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
56
mikroBASIC
MikroElektronika: Development tools - Books - Compilers
making it simple...
page
Unit Influence on Scope (Visibility)
Main Unit File