Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
Organization of Other Modules
Modules other than main start with the keyword 
module
. Implementation section
starts with the keyword 
implements
. Follow the model presented below:
module
<module name>
include <include other modules>
'********************************************************
'* Interface (globals):
'********************************************************
' symbols declarations
symbol ...
' constants declarations
const ...
' structures declarations
structure ...
' variables declarations
dim
Name[, Name2...] 
as
[^]type [
absolute
0x123] [
external]
[volatile] [
register] [sfr]
' procedures prototypes
sub
procedure
sub_procedure_name([
dim byref] [const] ParamName as
[^]type, [
dim byref] [const] ParamName2, ParamName3 as [^]type)
' functions prototypes
sub
function sub_function_name([
dim byref] [const] ParamName as
[^]type, [
dim byref] [const] ParamName2, ParamName3 as [^]type) as
[^]type
'********************************************************
'* Implementation:
'********************************************************
implements
' constants declarations
const ...
' variables declarations
dim ...
121
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroBasic PRO for AVR
CHAPTER 5