program是你工程程序执行的入口,是系统为你自动创建的。 当然你也可以修改他。exe文件就是根据这段代码生成的。 楼上的方法可以看到这段代码! 下面是Delphi帮助的说明: A program containsa program heading, a uses clause (optional), and a block of declarations and statements.The program heading specifies a name for the program. The uses clause lists units used by the program. The block contains declarations and statements that are executed when the program runs. The IDE expects to find these three elements in a single project (.dpr) file.The following example shows the project file for a program called Editor. 1 program Editor; 2 3 uses 4 QForms, {cross-platform Form} 5 REAbout in 'REAbout.pas' {AboutBox}, 6 REMain in 'REMain.pas' {MainForm}; 7 8 {$R *.res} 9 10 begin 11 Application.Title := 'Text Editor'; 12 Application.CreateForm(TMainForm, MainForm); 13 Application.Run;14 end.Line 1 contains the program heading. The uses clause is on lines 3 through 6. Line 8 is a compiler directive that links the project's resource file into the program. Lines 10 through 14 contain the block of statements that are executed when the program runs. Finally, the project file, like all source files, ends with a period.This is, in fact, a fairly typical project file. Project files are usually short, since most of a program's logic resides in its unit files. Project files are generated and maintained automatically, and it is seldom necessary to edit them manually.
当然你也可以修改他。exe文件就是根据这段代码生成的。
楼上的方法可以看到这段代码!
下面是Delphi帮助的说明:
A program containsa program heading,
a uses clause (optional), and
a block of declarations and statements.The program heading specifies a name for the program. The uses clause lists units used by the program. The block contains declarations and statements that are executed when the program runs. The IDE expects to find these three elements in a single project (.dpr) file.The following example shows the project file for a program called Editor. 1 program Editor;
2
3 uses
4 QForms, {cross-platform Form}
5 REAbout in 'REAbout.pas' {AboutBox},
6 REMain in 'REMain.pas' {MainForm};
7
8 {$R *.res}
9
10 begin
11 Application.Title := 'Text Editor';
12 Application.CreateForm(TMainForm, MainForm);
13 Application.Run;14 end.Line 1 contains the program heading. The uses clause is on lines 3 through 6. Line 8 is a compiler directive that links the project's resource file into the program. Lines 10 through 14 contain the block of statements that are executed when the program runs. Finally, the project file, like all source files, ends with a period.This is, in fact, a fairly typical project file. Project files are usually short, since most of a program's logic resides in its unit files. Project files are generated and maintained automatically, and it is seldom necessary to edit them manually.