Autor Beitrag
Krischa
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 118

Windows 7 64 Bit
Delphi 2007
BeitragVerfasst: Di 26.05.09 11:16 
Hi,
ich habe ein Problem mit der Ausgabe eines Wertes. Der Typ der variablen ist ein Double und soll auf 2 Nachkommestellen gerundet werden (was er auch erfolgreich macht). Wenn jetzt aber der Double keine Nachkommastellen besitzt (1.00 -> 1) soll er trozdem mir 2 Nachkommastellen ausgeben. Wie kann ich das erreichen das er das immer macht.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10184
Erhaltene Danke: 1259

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 26.05.09 11:21 
Moin!

Schau mal hier, ist ein sehr nützliches Tool von user profile iconLannes. :idea: ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
baka0815
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 489
Erhaltene Danke: 14

Win 10, Win 8, Debian GNU/Linux
Delphi 10.1 Berlin, Java, C#
BeitragVerfasst: Di 26.05.09 11:29 
Funktioniert das: Format('%.2n', [DeineZahl]);?
Krischa Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 118

Windows 7 64 Bit
Delphi 2007
BeitragVerfasst: Di 26.05.09 11:35 
Hi,
ist ein super Tool und es hat mir echt geholfen.

Danke :D

---Moderiert von user profile iconNarses: Beiträge zusammengefasst---

Ja das Funktioniert. Das Tool von Lannes erzeugt mir den Code.