User manual
190
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
Colon
Colon (:) is used in declarations to separate identier list from type identier. For example:
var
i, j : byte;
k : word;
In the program, use the colon to indicate a labeled statement:
start: nop;
...
goto start;
For more information, refer to Labels.
Dot
Dot (.) indicates an access to a eld of a record. For example:
person.surname := ‘Smith’;
For more information, refer to Records.
Dot is a necessary part of oating point literals. Also, dot can be used for accessing individual bits of registers in
mikroPascal.
Program Organization
mikroPascal PRO for dsPIC30/33 and PIC24 imposes strict program organization. Below you can nd models for writing
legible and organized source les. For more information on le inclusion and scope, refer to Units and Scope and Visibility.
Organization of Main Module
Basically, the main source le has two sections: declaration and program body. Declarations should be in their proper place in
the code, organized in an orderly manner. Otherwise, the compiler may not be able to comprehend the program correctly.
When writing code, follow the model presented below. The main unit should look like this:
program { program name }
uses { include other units }
//********************************************************
//* Declarations (globals):
//********************************************************
{ constants declarations }
const ...