Originale-mail to me for new edition

 

The unit heading

 

The unit heading specifies the unit’s name. It consists of the reserved word unit, followed by a valid identifier, followed by a semicolon. For applications developed using Borland tools, the identifier must match the unit file name. Thus, the unit heading

unit MainForm;

would occur in a source file called MAINFORM.pas, and the file containing the compiled unit would be MAINFORM.dcu.

Unit names must be unique within a project. Even if their unit files are in different directories, two units with the same name cannot be used in a single program.

 

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 implementation section

The initialization section

The interface section

Unit structure and syntax: Overview

 

 

译文

 

单元首部

 

单元首部指定单元名,它由保留字unit、用于表示单元名的有效标识符、分号(;)顺序组合组成。用Borland工具开发的应用程序中,此处的标识符必需与相应单元的文件相匹配,例如,对于程序首部

unit MainForm;

其相应的源文件名为MAINFORM.pas(大小写不敏感),编译过的单元文件名为MAINFORM.dcu(大小写不敏感)。

在同一个项目中,单元名必需唯一。即使两个或多个同名单元位于不同的目录中,它们也不能用于同一个程序。

 

主题组

程序和单元:概述

程序结构和语法:概述

程序首部

程序的uses子句

单元结构和语法:概述

单元首部

接口节

实现节

初始化节

结束节

单元引用和uses子句

uses子句的语法

多重和间接单元应用

循环单元引用

 

相关主题

结束节

实现节

初始化节

接口节

单元结构和语法:概述