AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Probleme Mit dem Runden von Zahlen

Ein Thema von Gehstock · begonnen am 18. Aug 2006 · letzter Beitrag vom 18. Aug 2006
 
Gehstock

Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
 
Delphi 2007 Professional
 
#1

Probleme Mit dem Runden von Zahlen

  Alt 18. Aug 2006, 10:06
Delphi-Quellcode:
function Runden(zahl: double; stellen: integer): double;
var multi: double;
begin
  multi:=IntPower(10, stellen);
  zahl:=round(zahl*multi);
  result:=zahl/multi;

end;
den Code Hab ich aus dem Netz

Delphi-Quellcode:
Resistor := floattostr(((strtofloat(edit_UV.text)-
strtofloat(edit_UD.text))/strtofloat(edit_ID.text))*1000);


if StrTofloat(Resistor)>999 then begin //kohm
pnl_calculated_resistor.caption := FloatToStr(Runden(((strtofloat(resistor)/
1000)), 2)+' KOhm'); ******Erzeugt Incompitable types 'string' 'Double'

end;
if StrTofloat(Resistor)<1000 then begin //ohm
pnl_calculated_resistor.caption := FloatToStr(Runden(((strtofloat(resistor)/
1)), 2)+' KOhm'); ******Erzeugt Incompitable types 'string' 'Double'
end;
Kann mir das Bitte Jemand helfen Knobel Schon 3 stunden Dran
Marcel
  Mit Zitat antworten Zitat
 


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 06:01 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