Solusi Button1 Lazarus For MAs Rifki

Sedikit Perubahan program yang bercetak tebal.

procedure TForm2.Button1Click(Sender: TObject);
var
be, ts, fc, fy  :single;
ql, qd, qu, Mu, L :single;
a, C, T, d1, Mn1 :single;
Cc, Cs, d2, d3, y, Mn2 :single;
df, be1, be2, Bo :single;
b, d, tw, tf, Ab :single;
begin
fc:=StrTofloat(Edit1.Text);
fy:=StrTofloat(Edit2.Text);

ts:=StrTofloat(Edit4.Text);
ql:=StrTofloat(Edit5.Text);
qd:=StrTofloat(Edit6.Text);
L:=StrTofloat(Edit7.Text);
Bo:=StrTofloat(Edit8.Text);

d:=StrToFloat(label47.Caption);
b:=StrToFloat(label63.Caption);
tw:=StrToFloat(label64.Caption);
tf:=StrToFloat(label65.Caption);
Ab:=StrToFloat(label73.Caption);

be1:=(L/4)*1000;
be2:=Bo*1000;
if be1>be2 then
  begin
  be:=be2;
  Label81.caption:=FloatToSTr(Be);
  end
  else
  begin
  be:=be1;
  Label81.caption:=FloatToSTr(Be);
  end;

a:=(Ab*fy)/(0.85*fc*be);
Label31.Caption:=FloatToStr(a);
if a<=ts then
begin
C:=0.85*fc*a*be;
Label39.Caption:=FloatToStr(C);

T:=Ab*fy;
Label40.Caption:=FloatToStr(T);

d1:=((d/2)+ts-(a/2));
Label41.Caption:=FloatToStr(d1);

Mn1:=(C*d1)/(10000);
Label42.Caption:=FloatToStr(Mn1);

Label53.Caption:=FloatToStr(0);
Label54.Caption:=FloatToStr(0);
Label55.Caption:=FloatToStr(0);
Label56.Caption:=FloatToStr(0);
Label57.Caption:=FloatToStr(0);
Label77.Caption:=FloatToStr(0);
if Mn1>=Mu  then
begin
MessageDlg(‘Mn 1 >= Mu Penampang Aman’, mtInformation, [mbOk], 0 );
end;
if  Mn1<Mu then
begin
MessageDlg(‘Mn 1 < Mu Penampang Tidak Aman’, mtInformation, [mbOk], 0 );
end;
end;

if a>ts then
begin
Cc:=0.85*fc*be*ts;
Label53.Caption:=FloatToStr(Cc);

Cs:=((Ab*fy)-(0.85*fc*be*ts))/2;
Label54.Caption:=FloatToStr(Cs);

df:=Cs/(b*fy);
Label77.Caption:=FloatToStr(df);

if df>tf then
begin
MessageDlg(‘Coba Ganti Profil yang lain, coba input lagi’, mtInformation, [mbOk], 0 );

Label55.Caption:=FloatToStr(0);
Label56.Caption:=FloatToStr(0);
Label57.Caption:=FloatToStr(0);
Label77.Caption:=FloatToStr(0);

Label39.Caption:=FloatToStr(0);
Label40.Caption:=FloatToStr(0);
Label41.Caption:=FloatToStr(0);
Label42.Caption:=FloatToStr(0);
end;

if df<tf then
begin
y:=((Ab*(d/2))-(df*b*(d-(df/2))))/(Ab-(df*b));

d2:=d+(ts/2)-y;
Label55.Caption:=FloatToStr(d2);
d3:=d-y-(df/2);
Label56.Caption:=FloatToStr(d3);

Mn2:=((Cc*d2)+(Cs*d3))/(10000);
Label57.Caption:=FloatToStr(Mn2);

Label39.Caption:=FloatToStr(0);
Label40.Caption:=FloatToStr(0);
Label41.Caption:=FloatToStr(0);
Label42.Caption:=FloatToStr(0);
end;

if Mn2>=Mu then
begin
MessageDlg(‘Mn 2 >= Mu Penampang Aman’, mtInformation, [mbOk], 0 );
end;
if Mn2<Mu  then
begin
MessageDlg(‘Mn 2 < Mu Penampang Tidak Aman’, mtInformation, [mbOk], 0 );
end;
end;
end;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s