Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
//********************************************************
//* Program body:
//********************************************************
begin
{ write your code here }
end.
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 ...
130
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroPASCAL PRO for AVR
CHAPTER 5