Originale-mail to me for new edition

 

The implementation section

 

The implementation section of a unit begins with the reserved word implementation and continues until the beginning of the initialization section or, if there is no initialization section, until the end of the unit. The implementation section defines procedures and functions that are declared in the interface section. Within the implementation section, these procedures and functions may be defined and called in any order. You can omit parameter lists from public procedure and function headings when you define them in the implementation section; but if you include a parameter list, it must match the declaration in the interface section exactly.

In addition to definitions of public procedures and functions, the implementation section can declare constants, types (including classes), variables, procedures, and functions that are private to the unit, that is, inaccessible to clients.

The implementation section can include its own uses clause, which must appear immediately after the word implementation. For information about the uses clause, see Unit references and the uses clause.

 

Topic groups

Programs and units: Overview

Program structure and syntax: Overview

The program heading

The program uses clause

The block

Unit structure and syntax: Overview

The unit heading

The interface section

The implementation section

The initialization section

The finalization section

Unit references and the uses clause

The syntax of a uses clause

Multiple and indirect unit references

Circular unit references

 

See also

The finalization section

The initialization section

The interface section

The unit heading

Unit structure and syntax: Overview

 

 

译文

 

实现节

 

在单元中,以保留字implementation开始,直到初始化节开始(如果初始化节存在,但不含保留字initialization)或直到单元结束,这之间的部分是实现节。在接口节中声明的过程和函数,都在实现节中定义。在实现节中,可以对这些过程和函数以任意的顺序定义和调用。此外,对这些在接口中声明的公共过程和函数,在实现节中定义时可以省略参数列表;但如果在定义时要包括参数列表,则必需与接口节中的声明严格匹配。

除了定义公共过程和函数以外,实现节还可以声明常量、类型(包括类)、变量、过程和函数等,这些实体仅限于在当前单元的实现节中使用,因此叫做私有(private)实体,也就是说,这些实体对于单元的客户是不可见的。

实现节可以包括其自身的uses子句,但必需紧随保留字implementation之后出现。关于uses子句的更多信息,见单元引用和uses子句

 

主题组

程序和单元:概述

程序结构和语法:概述

程序首部

程序的uses子句

单元结构和语法:概述

单元首部

接口节

实现节

初始化节

结束节

单元引用和uses子句

uses子句的语法

多重和间接单元应用

循环单元引用

 

相关主题

结束节

初始化节

接口节

单元首部

单元结构和语法:概述