unit mTaRe;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Mask, StdCtrls, Buttons;
type
TForm1 =
class(TForm)
EdWai: TEdit;
BtCA: TButton;
BtEins: TButton;
BtZwei: TButton;
BtDrei: TButton;
BtVier: TButton;
BtFuenf: TButton;
BtSechs: TButton;
BtSieben: TButton;
BtAcht: TButton;
BtNeun: TButton;
BtVorzeichen: TButton;
BtNull: TButton;
BtKomma: TButton;
BtMinus: TButton;
BtPlus: TButton;
BtDurch: TButton;
BtMal: TButton;
BtGleich: TButton;
BtSin: TButton;
BtStore: TButton;
BtCos: TButton;
BtRecall: TButton;
BtTan: TButton;
BtZweiNachkomma: TButton;
BtDreiNachkomma: TButton;
BtFakultaet: TButton;
BBtWurzel: TBitBtn;
BBtPi: TBitBtn;
BBteinsweg: TBitBtn;
BtQuadrat: TButton;
procedure BtEinsClick(Sender: TObject);
procedure BtZweiClick(Sender: TObject);
procedure BtDreiClick(Sender: TObject);
procedure BtVierClick(Sender: TObject);
procedure BtFuenfClick(Sender: TObject);
procedure BtSechsClick(Sender: TObject);
procedure BtSiebenClick(Sender: TObject);
procedure BtAchtClick(Sender: TObject);
procedure BtNeunClick(Sender: TObject);
procedure BtKommaClick(Sender: TObject);
procedure BtNullClick(Sender: TObject);
procedure BtPlusClick(Sender: TObject);
procedure BtGleichClick(Sender: TObject);
procedure BtMinusClick(Sender: TObject);
procedure BtMalClick(Sender: TObject);
procedure BtDurchClick(Sender: TObject);
procedure BtCAClick(Sender: TObject);
procedure BtVorzeichenClick(Sender: TObject);
procedure BBtWurzelClick(Sender: TObject);
procedure BBtPiClick(Sender: TObject);
procedure BtStoreClick(Sender: TObject);
procedure BtRecallClick(Sender: TObject);
procedure BtZweiNachkommaClick(Sender: TObject);
procedure BtDreiNachkommaClick(Sender: TObject);
procedure BBteinswegClick(Sender: TObject);
procedure BtQuadratClick(Sender: TObject);
private
{ Private-Deklarationen }
Text :
String;
Operator1 : Real;
Operator2 : Real;
Speicherwert :
String;
Rechenmethode :
String ;
procedure whatever;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BtEinsClick(Sender: TObject);
begin
Text := EdWai.Text +FloatToStr(1)
end;
procedure TForm1.BtZweiClick(Sender: TObject);
begin
EdWai.Text := EdWai.Text +FloatToStr(2)
end;
---Viele weitere Buttons---
procedure TForm1.BBteinswegClick(Sender: TObject);
var s :
string;
begin
{s := EdWai.Text;
SetLength( s, Length( s) -1);
EdWai.Text := s; }
S := EdWai.Text;
Delete(S, Length(EdWai.Text), 1);
EdWai.Text := S;
// EdWai.Text := EdWai.Text - ' '
end;
procedure TForm1.BtQuadratClick(Sender: TObject);
begin
EdWai.Text := FloatToStr(Power(StrToFloat(EdWai.Text)), 2)
end;
end.