打开工程,
点菜单project->view source
program Project1;
uses
; Forms,
; Unit1 in 'Unit1.pas' {Form1},
; dm in '../../../his/dm.pas' {adodm: TDataModule};
{$R *.res}
; ;var myvar:integer;//看这句
begin
; Application.Initialize;
; Application.CreateForm(TForm1, Form1);
; Application.CreateForm(Tadodm, adodm);
; Application.Run;
end.
但是最好是在某单元的public定义,
全局变量在面向对象编程中,不是推荐用法