type
TForm1 = class(TForm) EInvalidation = class(Exception)(这里提示:Expected';'but = found.)
public
ErrorCode: Integer;
constructor Create(Const Msg: String; ErrorNum: Integer);
end; EInvalidPassWord = class(EInvalidation)
public
constructor Create;
end; EInvalidInput = class(EInvalidation)
public
constructor Create(ErrorNum: Integer)
end;
PassWord: TEdit;
InputEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure InputEditKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;到底哪里出问题了阿?
TForm1 = class(TForm) EInvalidation = class(Exception)(这里提示:Expected';'but = found.)
public
ErrorCode: Integer;
constructor Create(Const Msg: String; ErrorNum: Integer);
end; EInvalidPassWord = class(EInvalidation)
public
constructor Create;
end; EInvalidInput = class(EInvalidation)
public
constructor Create(ErrorNum: Integer)
end;
PassWord: TEdit;
InputEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure InputEditKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;到底哪里出问题了阿?
具体放哪里啊?
我这个定义放在unit1里面的
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, DB, DBTables, StdCtrls, ADODB, Grids, DBGrids, Mask;type
EInvalidation = class(Exception) <---------- 放这里吧
public
ErrorCode: Integer;
constructor Create(Const Msg: String; ErrorNum: Integer);
end;
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
...implementation
.....
.....