Originale-mail to me for new edition

 

Unit references and the uses clause

 

A uses clause lists units used by the program, library, or unit in which the clause appears. (For information about libraries, see Libraries and packages.) A uses clause can occur in

·the project file for a program or library,

·the interface section of a unit, and

·the implementation section of a unit.

Most project files contain a uses clause, as do the interface sections of most units. The implementation section of a unit can contain its own uses clause as well.

The System unit is used automatically by every application and cannot be listed explicitly in the uses clause. (System implements routines for file I/O, string handling, floating point operations, dynamic memory allocation, and so forth.) Other standard library units, such as SysUtils, must be included in the uses clause. In most cases, all necessary units are placed in the uses clause when your project generates and maintains a source file.

For more information about the placement and content of the uses clause, see Multiple and indirect unit references, Circular unit references and Uses clause syntax.

 

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

Circular unit references

Multiple and indirect unit references

The syntax of a uses clause

Unit structure and syntax: Overview

 

 

译文

 

单元引用和uses子句

 

uses子句列出了程序、库或单元等使用的单元。(更多关于库的信息,见库和包。)uses子句可以出现在:

· 程序(program)或库(library)的工程文件中

· 单元的接口节;

· 单元的实现节。

System单元自动被每个应用程序使用而不在uses子句中显式地列出。(System单元实现了文件输入/输出,字符串处理,浮点运算、动态内存分配等例程。)其他的标准库单元,如SysUtils,则必需包括在uses子句中。大多数情况下,当一个工程产生并且保存在相应的源文件中时,所有必需的单元都已经被Borland集成开发环境自动置于uses子句中。

更多有关uses子句的布局和内容,见多重和间接单元应用循环单元引用uses子句的语法

 

主题组

程序和单元:概述

程序结构和语法:概述

程序首部

程序的uses子句

单元结构和语法:概述

单元首部

接口节

实现节

初始化节

结束节

单元引用和uses子句

uses子句的语法

多重和间接单元应用

循环单元引用

 

相关主题

循环单元引用

多重和间接单元应用

uses子句的语法

单元结构和语法:概述