回 帖 发 新 帖 刷新版面

主题:请问错在那???????

请问错在那???????

我要定义一个test类,
在这个类中定义一个temp方法;
不为什么出错?

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

type
temp=class
begin
   procedure test();
   begin
   ShowMesage('sdf');
      end;
      end;
end.

回复列表 (共2个回复)

沙发

地方不对

板凳


type
temp=class
begin
   procedure test();
   begin
   ShowMesage('sdf');
      end;
      end;
end
上面的是不是只能好似好麻烦!(请各位高手指点一下小弟!!!!!!!!!!!!)
type
temp=class
procedure test();
tempObjest;=temp;

end;
procedure tempObjest.test();
begin 
ShowMessage('dsdf');
end;







我来回复

您尚未登录,请登录后再回复。点此登录或注册