User manual

188
mikoPascal PRO for PIC32
MikroElektronika
Organization of Other Units
Units other than main start with the keyword unit. Implementation section starts with the keyword implementation.
Follow the model presented below:
unit { unit name }
uses { include other units }
//********************************************************
//* Interface (globals):
//********************************************************
{ constants declarations }
const ...
{ types declarations }
type ...
{ variables declarations }
var Name[, Name2...] : [^]type; [absolute 0x123;] [external;] [volatile;] [register;]
[sfr;]
{ procedures prototypes }
procedure procedure_name([var] [const] ParamName : [^]type; [var] [const] ParamName2,
ParamName3 : [^]type);
{ functions prototypes }
function function_name([var] [const] ParamName : [^]type; [var] [const] ParamName2,
ParamName3 : [^]type) : [^]type;
//********************************************************
//* Implementation:
//********************************************************
implementation
{ constants declarations }
const ...
{ types declarations }
type ...
{ variables declarations }
var Name[, Name2...] : [^]type; [absolute 0x123;] [external;] [volatile;] [register;]
[sfr;]
{ labels declarations }
label ...
{ procedures declarations }
procedure procedure_name([var] [const] ParamName : [^]type; [var] [const] ParamName2,
ParamName3 : [^]type); [ilevel 0x123;] [overload;] [forward;]
{ local declarations }
begin
...
end;