Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.91 KB | None | 0 0
  1. {ВВОД ЗНАКА ОПЕРАЦИИ}
  2. procedure TForm1.ClickSign(Sender: TObject);
  3. BEGIN
  4.  
  5.    if  (pos('/', Sign)=0) and
  6.        (pos('*', Sign)=0) and
  7.        (pos('+', Sign)=0) and
  8.        (pos('-', Sign)=0) then
  9.            pustota:=Edit1.Text;
  10.            if pustota='0' then
  11.            begin
  12.                  Delete(pustota,length(pustota),1);
  13.                  Edit1.Text:=FloatToStr(a);
  14.                  if minus then
  15.                  begin
  16.                       A:=-(StrToFloat(Edit1.Text));
  17.                       minus:=false;
  18.                  end else
  19.                       A:=StrToFloat(Edit1.Text);
  20.             end else
  21.             if minus then
  22.             begin
  23.               A:=-(StrToFloat(Edit1.Text));
  24.               minus:=false;
  25.             end else
  26.             A:=StrToFloat(Edit1.Text);
  27.             flag:=true;
  28. Sign:=(Sender as TButton).Caption;
  29. Edit1.Text:=FloatToStr(A);
  30. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement