我是刚学Delphi的,我在试着写一个程序的时老出错,代码如下
...
uses
...
type
TMainForm = class(TForm)
...
private
...
end;type
CallDevice = function():integer;stdcall;
end; //系统提示这里有错:‘IMPLEMENTATION’expected but ';' foundvar
MainForm: TMainForm;implementation
...
...
uses
...
type
TMainForm = class(TForm)
...
private
...
end;type
CallDevice = function():integer;stdcall;
end; //系统提示这里有错:‘IMPLEMENTATION’expected but ';' foundvar
MainForm: TMainForm;implementation
...
type
TMainForm = class(TForm)
CallDevice = function():integer;stdcall;
private
...
end;
如果是从属于TMainForm的,就放在TMainForm的Public部分中.
implementation下面
CallDevice = function():integer;stdcall; <-------这个位置
TMainForm = class(TForm)