Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework


Unit References and the Uses Clause



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə28/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   24   25   26   27   28   29   30   31   ...   294
DelphiLanguageGuide

Unit References and the Uses Clause
A uses clause lists units used by the program, library, or unit in which the clause appears. A uses clause can occur in
the project file for a program, or library
the interface section of a unit
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 and the 
SysInit
 unit are 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 explicitly included in the
uses clause. In most cases, all necessary units are placed in the uses clause by the IDE, as you add and remove
units from your project.
In unit declarations and uses clauses, unit names must match the file names in case. In other contexts (such as
qualified identifiers), unit names are case insensitive. To avoid problems with unit references, refer to the unit source
file explicitly:
16


uses MyUnit in "myunit.pas";
If such an explicit reference appears in the project file, other source files can refer to the unit with a simple uses
clause that does not need to match case:
uses Myunit;

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   24   25   26   27   28   29   30   31   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin