AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi Falls Variable(n) vorhanden mache das sonst mache dies
Thema durchsuchen
Ansicht
Themen-Optionen

Falls Variable(n) vorhanden mache das sonst mache dies

Ein Thema von thknub · begonnen am 26. Apr 2008 · letzter Beitrag vom 30. Apr 2008
Antwort Antwort
hesubat

Registriert seit: 25. Dez 2005
Ort: Görlitz
19 Beiträge
 
Delphi 7 Personal
 
#1

Re: Falls Variable(n) vorhanden mache das sonst mache dies

  Alt 27. Apr 2008, 00:15
Was meinst Du zu folgender Loesung:

Code:
procedure TForm1.Button1Click(Sender: TObject);
var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r: REAL; bo1,bo2,bo3,bo4,bo5,bo6:boolean;
begin

bo1:=false; bo2:=false; bo3:=false; bo4:=false; bo5:=false; bo6:=false;
if edit1.text<>'' then begin a := StrToFloat(edit1.Text); bo1:=true; end;
if edit2.text<>'' then begin b := StrToFloat(edit2.Text); bo2:=true; end;
if edit3.text<>'' then begin c := StrToFloat(edit3.Text); bo3:=true; end;
if edit4.text<>'' then begin d := StrToFloat(edit4.Text); bo4:=true; end;
if edit5.text<>'' then begin e := StrToFloat(edit5.Text); bo5:=true; end;
if edit6.text<>'' then begin f := StrToFloat(edit6.Text); bo6:=true; end;
if bo2 and bo3 and bo4 then g := sqrt(sqr(b)+sqr(c)-2*b*c*Cos(d));
if bo1 and bo3 and bo5 then h := sqrt(sqr(a)+sqr(c)-2*a*c*Cos(e));
if bo1 and bo2 and bo6 then i := sqrt(sqr(a)+sqr(b)-2*a*b*Cos(f));
if bo1 and bo2 and bo3 then j := ArcCos((sqr(b)+sqr(c)-sqr(a))/(2*b*c));
if bo1 and bo2 and bo3 then k := ArcCos((sqr(a)+sqr(c)-sqr(b))/(2*a*c));
if bo1 and bo2 and bo3 then l := ArcCos((sqr(a)+sqr(b)-sqr(c))/(2*a*b));
if bo2 and bo4 and bo5 then m := sin(d)*b/sin(e);
if bo1 and bo4 and bo5 then n := sin(e)*a/sin(d);
if bo1 and bo4 and bo6 then o := sin(f)*a/sin(d);
if bo1 and bo2 and bo5 then p := ArcSin((a*Sin(e))/b);
if bo1 and bo2 and bo4 then q := ArcSin((b*Sin(d))/a);
if bo1 and bo3 and bo4 then r := ArcSin((c*Sin(d))/a);

edit7.Text := FloatToStr(g);
edit8.text := FloatToStr(h);
edit9.Text := FloatToStr(i);
edit10.Text := FloatToStr(j);
edit11.Text := FloatToStr(k);
edit12.Text := FloatToStr(l);
edit13.Text := FloatToStr(m);
edit14.Text := FloatToStr(n);
edit15.text := FloatToStr(o);
edit16.Text := FloatToStr(p);
edit17.Text := FloatToStr(q);
edit18.Text := FloatToStr(r);

end;
Heinz Subat
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz