Mikroelektronika MIKROE-724 データシート

ページ / 726
190
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Colon
Colon (
:
) is used to indicate a labeled statement:
start:  nop
  ‘...
goto start
For more information, refer to Labels.
Dot
Dot (
.
) indicates access to a structure member. For example:
person.surname = “Smith”
For more information, refer to Structures.
Dot is a necessary part of floating point  literals. Also, dot can be used for accessing  individual  bits of registers  in 
mikroBasic PRO for dsPIC30/33 and PIC24.
Program Organization
mikroBasic PRO for dsPIC30/33 and PIC24 imposes strict program organization. Below you can find models for writing 
legible and organized source files. For more information on file inclusion and scope, refer to Modules and to Scope 
and Visibility.
Organization of Main Module
Basically, the main source file 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 module should look like this:
program <program name>
include <include other modules>
‘********************************************************
‘* Declarations (globals):
‘********************************************************
‘ symbols declarations
symbol ...
‘ constants declarations
const ...