Предмет:
Тип роботи:
Курсова робота
К-сть сторінок:
69
Мова:
Українська
style="text-align: justify;">b[t]:=')';
a[t]:=memo1.Text;
memo1.Text:=rezul2(t);
end
else begin panel3.Caption:=''; MessageBeep(0);
end;
if (sk=0) then panel3.Caption:='';
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
case meraisch of
10: memo1.Text:=Destodr(memo1.Text,16);
2: memo1.Text:=Destodr(Drtodes(memo1.Text,2),16);
8: memo1.Text:=Destodr(Drtodes(memo1.Text,8),16)
end;
if memo1.Text='' then memo1.Text:='0';
glob_check:=true;
meraisch:=16;
if (radiobutton11.Checked=true) then
radioButton11Click(radioButton1);
if (radiobutton10.Checked=true) then
radioButton10Click(radioButton1);
if (radiobutton9.Checked=true) then
radioButton9Click(radioButton1);
if (radiobutton8.Checked=true) then
radioButton8Click(radioButton1);
radiobutton8.Checked:=true;
radiobutton8.Visible:=true;
radiobutton9.Visible:=true;
radiobutton10.Visible:=true;
radiobutton11.Visible:=true;
radiobutton5.Visible:=false;
radiobutton6.Visible:=false;
radiobutton7.Visible:=false;
speedbutton29.Enabled:=true;
speedbutton30.Enabled:=true;
speedbutton1.Enabled:=true;
speedbutton11.Enabled:=true;
speedbutton12.Enabled:=true;
speedbutton5.Enabled:=true;
speedbutton15.Enabled:=true;
speedbutton48.Enabled:=false;
speedbutton31.Enabled:=false;
speedbutton37.Enabled:=false;
speedbutton39.Enabled:=false;
speedbutton45.Enabled:=false;
speedbutton49.Enabled:=false;
speedbutton38.Enabled:=false;
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
case meraisch of
10: memo1.Text:=DestoDr(memo1.Text,8);
16: memo1.Text:=DestoDr(Drtodes(memo1.Text,16),8);
2: memo1.Text:=DestoDr(Drtodes(memo1.Text,2),8);
end;
if memo1.Text='' then memo1.Text:='0';
glob_check:=true;
meraisch:=8;
if (radiobutton11.Checked=true) then
radioButton11Click(radioButton1);
if (radiobutton10.Checked=true) then
radioButton10Click(radioButton1);
if (radiobutton9.Checked=true) then
radioButton9Click(radioButton1);
if (radiobutton8.Checked=true) then
radioButton8Click(radioButton1);
radiobutton8.Checked:=true;
radiobutton8.Visible:=true;
radiobutton9.Visible:=true;
radiobutton10.Visible:=true;
radiobutton11.Visible:=true;
radiobutton5.Visible:=false;
radiobutton6.Visible:=false;
radiobutton7.Visible:=false;
speedbutton48.Enabled:=false;
speedbutton31.Enabled:=false;
speedbutton37.Enabled:=false;
speedbutton39.Enabled:=false;
speedbutton45.Enabled:=false;
speedbutton49.Enabled:=false;
speedbutton38.Enabled:=false;
speedbutton2.Enabled:=false;
speedbutton3.Enabled:=false;
speedbutton25.Enabled:=false;
speedbutton26.Enabled:=false;
speedbutton27.Enabled:=false;
speedbutton28.Enabled:=false;
speedbutton29.Enabled:=false;
speedbutton30.Enabled:=false;
speedbutton11.Enabled:=true;
speedbutton12.Enabled:=true;
speedbutton13.Enabled:=true;
speedbutton14.Enabled:=true;
speedbutton15.Enabled:=true;
speedbutton1.Enabled:=true;
speedbutton5.Enabled:=true;
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
case meraisch of
2: memo1.Text:=DrtoDes(memo1.Text,2);
8: memo1.Text:=DrtoDes(memo1.Text,8);
16: memo1.Text:=DrtoDes(memo1.Text,16);
end;
glob_check:=true;
if memo1.Text='' then memo1.Text:='0';
meraisch:=10;
radiobutton5.Checked:=true;
radiobutton8.Visible:=false;
radiobutton9.Visible:=false;
radiobutton10.Visible:=false;
radiobutton11.Visible:=false;
radiobutton5.Visible:=true;
radiobutton6.Visible:=true;
radiobutton7.Visible:=true;
speedbutton48.Enabled:=true;;
speedbutton31.Enabled:=true;
speedbutton37.Enabled:=true;
speedbutton39.Enabled:=true;
speedbutton45.Enabled:=true;
speedbutton49.Enabled:=true;
speedbutton38.Enabled:=true;
speedbutton2.Enabled:=true;
speedbutton3.Enabled:=true;
speedbutton25.Enabled:=false;
speedbutton26.Enabled:=false;
speedbutton27.Enabled:=false;
speedbutton28.Enabled:=false;
speedbutton29.Enabled:=false;
speedbutton30.Enabled:=false;
speedbutton11.Enabled:=true;
speedbutton12.Enabled:=true;
speedbutton13.Enabled:=true;
speedbutton14.Enabled:=true;
speedbutton15.Enabled:=true;
speedbutton1.Enabled:=true;
speedbutton5.Enabled:=true;
end;
procedure TForm1.SpeedButton19Click(Sender: TObject);
var z,n: integer;
begin
case meraisch of
2: memo1.Text:=DrtoDes(memo1.Text,2);
8: memo1.Text:=DrtoDes(memo1.Text,8);
16: memo1.Text:=DrtoDes(memo1.Text,16);
end;
if (Sk=0) then begin
t:=t-1; b[t]:='0'; end;
t:=t+1;
a[t]:=memo1.Text;
memo1.text:=rezul(t);
then t:=t-1;
glob_check:=true;
end
else MessageBeep(0);
case meraisch of
2: memo1.Text:=DesToDr(memo1.Text,2);
8: memo1.Text:=DesToDr(memo1.Text,8);
16: memo1.Text:=DesToDr(memo1.Text,16);
end;
if meraisch<>10 then
begin
if (radiobutton11.Checked=true) then
radioButton11Click(radioButton1);
if (radiobutton10.Checked=true) then
radioButton10Click(radioButton1);
if (radiobutton9.Checked=true) then
radioButton9Click(radioButton1);
if (radiobutton8.Checked=true) then
radioButton8Click(radioButton1);
end;
trig:=false;
end;
procedure TForm1.SpeedButton39Click(Sender: TObject);
begin
{if (b[t]=')') then
begin
t:=t+1;
a[t]:=memo1.Text;
b[t]:='s';
trig:=true;
memo1.Text:=rezul2(t);
end; }
if radiobutton6.Checked=true then
begin
if ((inv.Checked=true) and (hyp.Checked=false))then
begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) )
then
begin
zn1:=strtozr(memo1.Text);
zn1:=Arcsinzr(zn1);
obrazec1:=zrtoreal(zn1);
memo1.Text:=Floattostr(obrazec1);
end
else
begin
memo1.Text:='Недопустимоезначение';
nev:=true;
end;
end;
if ((inv.Checked=true) and (hyp.Checked=true)) then
begin
zn1:=strtozr(memo1.Text);
zn1:= AsinhZR(zn1);
obrazec1:=zrtoreal(zn1);
memo1.Text:=Floattostr(obrazec1);
end;
if ((inv.Checked=false) and ( hyp.Checked=true)) then
begin
zn1:=strtozr(memo1.Text);
zn1:= sinhzr(zn1);
obrazec1:=zrtoreal(zn1);
memo1.Text:=Floattostr(obrazec1);
end;
if ((inv.Checked=false) and ( hyp.Checked=false)) then
begin
zn1:=strtozr(memo1.Text);
zn1:= sinzr(zn1);
obrazec1:=zrtoreal(zn1);
memo1.Text:=Floattostr(obrazec1);
end;
end;
if radiobutton5.Checked=true then
begin
if ((inv.Checked=true) and (hyp.Checked=false))then
begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) )
then
memo1.Text:=floattostr(180/pi*Arcsin(strtofloat(memo1.Text)))
else
begin
memo1.Text:='Недопустимоезначение';
nev:=true;
end;
end;
if ((inv.Checked=true) and (hyp.Checked=true)) then
begin
if (strtofloat(memo1.Text)<1) then
begin
memo1.Text:='Недопустимое значение'; exit;
end
else
zn1:=strtozr(memo1.Text);
zn1:=AsinhZr(zn1);
obrazec1:=zrtoreal(zn1);
memo1.Text:=floattostr(obrazec1);
end ;
if ((inv.Checked=false) and ( hyp.Checked=true)) then
memo1.Text:=floattostr(sinh(strtofloat(memo1.Text)));
if ((inv.Checked=false) and ( hyp.Checked=false)) then
begin
if (frac(strtofloat(memo1.Text))=0 )then begin
if (trunc(strtofloat(memo1.Text))=0) then begin memo1.Text:='0'; exit; end;
if (trunc(strtofloat(memo1.Text))=90) then begin memo1.Text:='1';exit end;
if (trunc(strtofloat(memo1.Text))=270) then begin memo1.Text:='-1';exit end;
if (trunc(strtofloat(memo1.Text))=180) then begin memo1.Text:='0';exit end;
if (trunc(strtofloat(memo1.Text)) mod 360=0) then begin memo1.text:='0';exit end;
if (trunc(strtofloat(memo1.Text)) mod 360=90) then begin memo1.text:='1';exit end;
if (trunc(strtofloat(memo1.Text)) mod 360=180) then begin memo1.text:='0';exit end;
end;
zn1:=strtozr(memo1.Text);
zn1:=DegToRadZR(Zn1);
zn1:=sinzr(zn1);
obrazec1:=zrtoreal(zn1);
memo1.Text:=floattostr(obrazec1);
end;
end;
if radiobutton7.Checked=true then
begin
if ((inv.Checked=true) and (hyp.Checked=false))then
begin
if ((strtofloat(memo1.Text)<=1) and (strtofloat(memo1.Text)>=(-1)) )
then
memo1.Text:=floattostr(200/pi*Arcsin(strtofloat(memo1.Text)))
else
begin
memo1.Text:='Недопустимоезначение';
nev:=true;
end;
end;
if ((inv.Checked=true) and (hyp.Checked=true)) then
memo1.Text:=floattostr(Arcsinh(strtofloat(memo1.Text)));
if ((inv.Checked=false) and ( hyp.Checked=true)) then