Молниезащита зданий и сооружений. Часть2. Анфилофьев Б.А - 6 стр.

UptoLike

begin
If (form1.Edit1.Text<>'') and (Form1.Edit3.Text<>'') and (Form1.edit2.Text<>'') and
(Form1.edit4.Text<>'') then
begin n1:=strtoint(form1.Edit1.Text);
a:=StrToInt(Form1.Edit2.Text);
b:=StrToInt(Form1.Edit3.Text);
hx:=StrToInt(Form1.Edit4.Text);
l:=StrToInt(Form1.Edit5.Text);
N:=(power(10,(-6)))*n1*((a+6*hx)*(b+6*hx)-7.7*(power(hx,2)));
if N<0 then begin form1.Label18.caption:='A';
rx:=sqr((power((b/2),2))+(power((l+a),2))); h:=(rx+(1.63*hx)/1.5);
form1.Label20.caption:=FloatToStr(rx); form1.label25.Caption:=floattostr(h); end else
rx:=1.5*(150-hx/0.92); h:=(rx+(1.63*hx)/1.5); label18.Caption:='Б';
form1.Label20.Caption:=floattostr(rx); form1.label25.Caption:=floattostr(h)
end else form4.show;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Form1.hide;
Form2.Show;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Halt(1);
end;
end.
Модуль второй
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Button1: TButton;
Button2: TButton;
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit1, Unit3, Unit5;
{$R *.DFM}
procedure TForm2.RadioButton1Click(Sender: TObject);
begin
if Form2.RadioButton1.Checked=true then begin Form1.Show;