M
mouse_1425
Unregistered / Unconfirmed
GUEST, unregistred user!
在运行编译时,我的Program程序中经常会在Var后面出现如下错误:
Identifier expected but ’VAR’ found。
这究竟是怎么回事啊,而我又该用什么办法来解决它啊?请知道的大侠指导一下我这个菜鸟,先谢谢了!
参考:程序全过程如下
program ZLml;
uses
Forms,
Windows,
ufrmmain in 'UFRMMAIN.PAS' {frmmain},
ZLmledit in 'ZLmledit.pas' {ZLedit},
ZLmlfound in 'ZLmlfound.pas' {ZLfound},
ufrmabout in 'ufrmabout.pas' {frmabout},
ufrmReport in 'ufrmReport.pas' {frmReport},
ufrmjnmldyxz in 'ufrmjnmldyxz.pas' {frmjnmldyxz},
{$R *.res}
Var
hMutex:HWND;
Ret:Integer;
begin
Application.Initialize;
Application.Title := '资料目录查询管理系统';
hMutex:=CreateMutex(nil,False,'资料目录查询管理系统');
Ret:=GetLastError;
if Ret<>ERROR_ALREADY_EXISTS Then
begin
Application.CreateForm(Tfrmmain, frmmain);
Application.Run;
end
else
ReleaseMutex(hMutex);
end.
Identifier expected but ’VAR’ found。
这究竟是怎么回事啊,而我又该用什么办法来解决它啊?请知道的大侠指导一下我这个菜鸟,先谢谢了!
参考:程序全过程如下
program ZLml;
uses
Forms,
Windows,
ufrmmain in 'UFRMMAIN.PAS' {frmmain},
ZLmledit in 'ZLmledit.pas' {ZLedit},
ZLmlfound in 'ZLmlfound.pas' {ZLfound},
ufrmabout in 'ufrmabout.pas' {frmabout},
ufrmReport in 'ufrmReport.pas' {frmReport},
ufrmjnmldyxz in 'ufrmjnmldyxz.pas' {frmjnmldyxz},
{$R *.res}
Var
hMutex:HWND;
Ret:Integer;
begin
Application.Initialize;
Application.Title := '资料目录查询管理系统';
hMutex:=CreateMutex(nil,False,'资料目录查询管理系统');
Ret:=GetLastError;
if Ret<>ERROR_ALREADY_EXISTS Then
begin
Application.CreateForm(Tfrmmain, frmmain);
Application.Run;
end
else
ReleaseMutex(hMutex);
end.