Unit file structure

Source: Internet
Author: User
Unit unit1; interface {Interface part start} uses {reference unit list, this is optional. If the list contains a constant/type/variable/process and function that must follow the interface keyword} {the Interface part declares the constant/type/variable/process and function, these declarations are just like your own Declarations} {processes and functions declared in the interface section, like using the forward keyword} {Interface part end} implementation {implementation part} uses {if it contains the uses sentence, must keep up with the keyword Implementation} {the processes and functions defined in the interface can be defined and called in any order .} {The process and function list can be omitted here. If included, the process and function list must be the same .} {constants/types (including classes), variables/procedures, and functions that are private to a unit can be defined, but they are invisible to customers who reference the unit.} {$ R *. DFM} {if it is a unit file of the corresponding form, this sentence will appear. $ R command is used to load an external resource file, which is used to load a Form file with the same name for compilation .} initialization {initialization part }{ProgramExecute first when starting, and execute in sequence} {initialization of a UnitCodeBefore running, it runs the initialization part of every unit it uses} finalization {finalization part, and execution at program end} end.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.