User`s manual
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
60
mikroBASIC
MikroElektronika: Development tools - Books - Compilers
making it simple...
page
Program elements (constants, variables and routines) need to be declared in their
proper place in the code. Otherwise, compiler may not be able to comprehend the
program correctly.
Organization of the main unit should have the following form:
program program_name
' program name
include ...
' include other units
symbol ...
' symbols declaration
const ...
' constants declaration
dim ...
' variables declaration
sub procedure procedure_name
' procedures declaration
...
end sub
sub function function_name
' functions declaration
...
end sub
main:
' program must start with label
' main
...
' program body
end.
' end of program
making it simple...
PROGRAM ORGANIZATION