在用线程时提示constructor出错,该如何处理
在用线程时提示constructor出错
帮忙看下,我在用constructor构造线程类时,提示错误.
constructor tthreadquery.create(query:tadoquery;datasource:tdatasource);
begin
fquery:=query;
fdatasource:=datasource;
freeonterminate:=false;
end;
提示如下错误
statement excepted but 'constructor ' found
不知道什么意思,请告知一下
------解决方案--------------------
前面的语句有问题。
很可能是少了 end;
------解决方案--------------------
procedure ttt.Execute;
begin
{ Place thread code here }
constructor ttt.Create(a: string);
begin
end;
一楼说的对,
[Error] Unit2.pas(37): Statement expected but 'CONSTRUCTOR ' found
帮忙看下,我在用constructor构造线程类时,提示错误.
constructor tthreadquery.create(query:tadoquery;datasource:tdatasource);
begin
fquery:=query;
fdatasource:=datasource;
freeonterminate:=false;
end;
提示如下错误
statement excepted but 'constructor ' found
不知道什么意思,请告知一下
------解决方案--------------------
前面的语句有问题。
很可能是少了 end;
------解决方案--------------------
procedure ttt.Execute;
begin
{ Place thread code here }
constructor ttt.Create(a: string);
begin
end;
一楼说的对,
[Error] Unit2.pas(37): Statement expected but 'CONSTRUCTOR ' found