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


Avoiding circular package references



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə218/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   214   215   216   217   218   219   220   221   ...   294
DelphiLanguageGuide

Avoiding circular package references
Packages cannot contain circular references in their requires clauses. This means that
A package cannot reference itself in its own requires clause.
A chain of references must terminate without rereferencing any package in the chain. If package A requires
package B, then package B cannot require package A; if package A requires package B and package B requires
package C, then package C cannot require package A.
187


Duplicate package references
The compiler ignores duplicate references in a package's requires clause. For programming clarity and readability,
however, duplicate references should be removed.
The contains clause
The contains clause identifies the unit files to be bound into the package. Do not include file-name extensions in the
contains clause.
Avoiding redundant source code uses
A package cannot be listed in the contains clause of another package or the uses clause of a unit.
All units included directly in a package's contains clause, or indirectly in the uses clauses of those units, are bound
into the package at compile time. The units contained (directly or indirectly) in a package cannot be contained in any
other packages referenced in requires clause of that package.
A unit cannot be contained (directly or indirectly) in more than one package used by the same application.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   214   215   216   217   218   219   220   221   ...   294




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

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin