Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {ВВОД ЗНАКА ОПЕРАЦИИ}
- procedure TForm1.ClickSign(Sender: TObject);
- BEGIN
- if (pos('/', Sign)=0) and
- (pos('*', Sign)=0) and
- (pos('+', Sign)=0) and
- (pos('-', Sign)=0) then
- pustota:=Edit1.Text;
- if pustota='0' then
- begin
- Delete(pustota,length(pustota),1);
- Edit1.Text:=FloatToStr(a);
- if minus then
- begin
- A:=-(StrToFloat(Edit1.Text));
- minus:=false;
- end else
- A:=StrToFloat(Edit1.Text);
- end else
- if minus then
- begin
- A:=-(StrToFloat(Edit1.Text));
- minus:=false;
- end else
- A:=StrToFloat(Edit1.Text);
- flag:=true;
- Sign:=(Sender as TButton).Caption;
- Edit1.Text:=FloatToStr(A);
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement