我新建了一个Unit.pas,在里面输入了 msg = class
function msg1(Const msg:string):Boolean; private
{ Private declarations }
public
{ Public declarations }
end;可是这个类只能实例化后才能使用,如何直接引用里面的过程,而不用实例化呢?
function msg1(Const msg:string):Boolean; private
{ Private declarations }
public
{ Public declarations }
end;可是这个类只能实例化后才能使用,如何直接引用里面的过程,而不用实例化呢?
class function msg1(Const msg:string):Boolean;
class function msg1(Const msg2:string):Boolean;//??? private
{ Private declarations }
public
{ Public declarations }
end;
implementationfunction msg.msg1(Const msg2:string):Boolean;begin
//...
end;编译不过啊,何况为什么如果我新建一个窗体,把这些过程放在那个窗体的pas文件中,就不用实例化了啊
//...
end;