[Error] Unit1.pas(101): Declaration expected but end of file found
要怎么调试呢?unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
RadioGroup1: TRadioGroup;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure Label1Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
private
{ Pr
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
if RadioGroup1.ItemIndex=0 then
begin
Label1.Caption :='整数类型:'+'Integer';
Label2.Caption :='占用字节数:'+IntToStr(SizeOf (Integer));
Label3.Caption :='取值上限:' + IntToStr(High (Integer));
Label4.Caption :='取值下限:' + IntToStr(Low (Integer));
end;
if RadioGroup1.ItemIndex=1 then
begin
Label1.Caption :='整数类型:'+'Cardinal';
Label2.Caption :='占用字节数:'+IntToStr(SizeOf (Cardinal));
Label3.Caption :='取值上限:' +IntToStr(High (Cardinal));
Label4.Caption :='取值下限:' +IntToStr(Low (Cardinal));
end;
if RadioGroup1.ItemIndex=2 then
begin
Label1.Caption :='整数类型:'+'Shortint';
Label2.Caption :='占用字节数:'+IntToStr(SizeOf (Shortint));
Label3.Caption :='取值上限:' + IntToStr(High (Shortint));
Label4.Caption :='取值下限:' + IntToStr(Low (Shortint));
end;
if RadioGroup1.ItemIndex=3 then
begin
Label1.Caption :='整数类型:'+'Smallint';
Label2.Caption :='占用字节数:'+IntToStr(SizeOf (Smallint));
Label3.Caption :='取值上限:' +IntToStr(High (Smallint));
Label4.Caption :='取值下限:' +IntToStr(Low (Smallint));
end;
if RadioGroup1.ItemIndex=4 then
begin
Label1.Caption :='整数类型:'+'Longint';
Label2.Caption :='占用字节数:'+IntToStr(SizeOf (Longint));
Label3.Caption :='取值上限:' + IntToStr(High (Longint));
Label4.Caption :='取值下限:' + IntToStr(Low (Longint));
end;
if RadioGroup1.ItemIndex=5 then
begin
Label1.Caption :='整数类型:'+'Int64';
Label2.Caption :='占用字节数:'+ IntToStr(SizeOf (Int64));
Label3.Caption :='取值上限:'+ IntToStr(High (Int64));
Label4.Caption :='取值下限:'+ IntToStr(Low (Int64));
end;
if RadioGroup1.ItemIndex=6 then
begin
Label1.Caption :='整数类型:'+'Byte';
Label2.Caption :='占用字节数:'+ IntToStr(SizeOf (Byte));
Label3.Caption :='取值上限:'+ IntToStr(High (Byte));
Label4.Caption :='取值下限:'+ IntToStr(Low (Byte));
end;
if RadioGroup1.ItemIndex=7 then
begin
Label1.Caption :='整数类型:'+'Word';
Label2.Caption :='占用字节数:'+ IntToStr(SizeOf (Word));
Label3.Caption :='取值上限:' + IntToStr(High (Word));
Label4.Caption :='取值下限:'+ IntToStr(Low (Word));
end;
if RadioGroup1.ItemIndex=8 then
begin
Label1.Caption :='整数类型:'+'LongWord';
Label2.Caption :='占用字节数:'+ IntToStr(SizeOf (LongWord));
Label3.Caption :='取值上限:'+ IntToStr(High (LongWord));
Label4.Caption :='取值下限:'+ IntToStr(Low (LongWord));
end;
end;
编译错误如下:
[Error] Unit1.pas(101): Declaration expected but end of file found
[Error] Unit1.pas(16): Unsatisfied forward or external declaration: 'TForm1.Label1Click'
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'