UnitUnit1; Interface {Interface section begins} uses {Reference Unit list, which is optional if the containing must immediately follow the interface keyword} {The Interface section declares constants/types/variables/procedures and functions, which are like their own declarations for reference units} {procedures and functions that are declared in the interface section are like using the Forward keyword} varForm1:tform1; Function Ex (): Interger; //external calls, what's called Don't know//If a function is declared in this unit and needs to be called to another unit, it needs to be declared here (interface) {End of Interface Section} Implementation {Implementation Part} uses {If you include uses words, you must follow the keyword implementation} {The procedures and functions defined in interface are implemented here, and can be defined and invoked in any order.} {a list of procedures and functions can be omitted here, if included, must be the same.} {You can define cell-private constants/types (including classes)/variables/procedures and functions, but these are not visible to clients of the referencing unit} {$R *.DFM} {if it is a corresponding form of the cell file, there will be this sentence. The $R directive is used to load an external resource file, which is a form file loaded with the same name that is compiled together.} initialization {Initialization Section} {the program executes at startup and executes sequentially} {before the initialization code of a unit runs, it runs the initialization portion of each cell it uses .} Finalization {end part, execution at end of program} End.
Reprint Description:
Disclaimer: No description, this article is code-first original. Reprint must indicate the source.
NOTE: Reprint must retain the full text, if need to revise, please contact the author.
Permanent address of this article: http://codeup.org/archives/113
DELPHI-UNIT file Structure