unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
r,c,s:real;
const pi=3.141596;
begin
r:=StrToFloat(Edit1.Text);
C:=2*pi*r;
s:=pi*sqr(r);
Label2.Caption:='圆的周长为:'+FloatToStr(c)+' '+Chr(13)+'面积为:
'+FloatToStr(s);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;
end.
刚学D,从书上找了个小程序练习一下,结果提示出现这么三个问题,请高手指点一下!万分感谢!!
[Error] Unit5.pas(39): Unterminated string
[Error] Unit5.pas(40): Unterminated string
[Fatal Error] Project5.dpr(5): Could not compile used unit 'Unit5.pas'