Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Sa 05.03.05 13:50 
Hallo zusammen Wieder Einmal Möchte meinen Rechner verbessern.
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
var
  zahl1, zahl2, ergebnis: Real;
begin
  zahl1    := StrToReal(Edit1.Text);
  zahl2    := StrToReal(Edit2.Text);
  ergebnis := zahl1 + zahl2;
  Label_Resultat.Caption := FloatToStr(ergebnis);
end;
  {----------------}
procedure TForm5.Button2Click(Sender: TObject);
  {----------------}
var
  zahl1, zahl2, ergebnis: Real;
begin
  zahl1    := StrToReal(Edit1.Text);
  zahl2    := StrToReal(Edit2.Text);
  ergebnis := zahl1 - zahl2;
  Label_Resultat.Caption := FloatToStr(ergebnis);
end;
  {----------------}
procedure TForm5.Button3Click(Sender: TObject);
  {----------------}
var
  zahl1, zahl2, ergebnis: Real;
begin
  zahl1    := StrToReal(Edit1.Text);
  zahl2    := StrToReal(Edit2.Text);
  ergebnis := zahl1 * zahl2;
  Label_Resultat.Caption := FloatToStr(ergebnis);
end;
  {----------------}
procedure TForm5.Button4Click(Sender: TObject);
  {----------------}
var zahl1, zahl2, ergebnis: Real;
begin
  zahl1    := StrToReal(Edit1.Text);
  zahl2    := StrToReal(Edit2.Text);
  if zahl2 <> 0
  then begin
         ergebnis := zahl1 / zahl2;
         Label_Resultat.Caption := FloatToStr(ergebnis);


So soweit so Gut aber Jetzt hat es Ja 4 Buttons wie ihr Seht und 2 Eingabefelder
Jetzt möchte ich ein Eingabe Feld dort kann man dann eingeben
1-2
Dann auf den Button Rechnen Drücken und 1, 2, 3 Dass Resultat stet im Label_Resultat

Aber Hab Keine Ahnung Wie ich So etwas Hinbekommen Könnte Hat Jemand Hilfe?
Big DHX
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 05.03.05 13:52 
Was du suchst, ist ein Suche in: Delphi-Forum, Delphi-Library PARSER für mathematische Formeln.

_________________
We are, we were and will not be.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 05.03.05 13:53