Einzelnen Beitrag anzeigen

Gilmohr

Registriert seit: 3. Mär 2011
15 Beiträge
 
#32

AW: wer kann helfen und ist aus Hamburg?

  Alt 27. Mär 2011, 14:23
hi, ok werd ich in zukunft machen

die frage dazu: woran liegt es dass wenn radioButton1 aktiv ist die felhlermeldung ""kein gültiger gleitkommawert kommt?

hab doch den array V2[a] wieder mit strToFloat als dezimalzahl umgewandelt....

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);

const
  K = 1273.239545; // ~= 4 *1000/ PI

begin

  a := 0 ;
    repeat

    StringGrid2.RowCount := a+1;
    if RadioButton2.Checked then begin //wenn Strömungsgeschw gewählt berechne mit Formel Strömungsgeschw
    v2[a] := FloatToStr((Volumenstrom * K) / ( StrToInt(d[a])*StrToInt(d[a])));
    StringGrid2.Cells[0,a] := v2[a] ;
    end;

    if RadioButton1.Checked then begin //wenn Druckverlust gewählt berechne mit Formel Druckverlust
    v2[a] := FloatToStr((Volumenstrom * K) / ( StrToInt(d[a])*StrToInt(d[a])));
    p2[a] := FloatToStr((StrToInt(p1[a])) * StrToFloat(v2[a]) * StrToFloat(v2[a]) / ( StrToFloat(v1[a])/100 * StrToFloat(v1[a])/100 ));
    StringGrid2.Cells[1,a] := p2[a] ;
    end;

    memo1.Lines.add(' - j= ' +intToStr(j)+' - a= '+intToStr(a));
    inc (a);
    until
    a = j

end;
was hab ich da übersehen bzw. falsch gemacht?
  Mit Zitat antworten Zitat