Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Variablentyp Kommazahl (https://www.delphipraxis.net/80995-variablentyp-kommazahl.html)

Mucki 18. Nov 2006 19:07


Variablentyp Kommazahl
 
Sorry...

Hallo Leute...

Ich habe 1 Frage, die mir bestimmt jemand von Euch beantworten kann.

Wie kann ich einen Wert des Types Real (dachte ich!?)
auf 2 Stellen nach dem Komma begrenzen, also den Rest abschneiden ? :gruebel:

ein Beispiel: statt 2.22222222203030 E02934
nur 2.22

Thorben_K 18. Nov 2006 19:09

Re: Variablentyp Kommazahl
 
schau dir mal FormatFloat oder round in der Delphi hilfe an, die machen was du brauchst

Gruss Thorben

mr47 18. Nov 2006 19:10

Re: Variablentyp Kommazahl
 
RoundTo() in der Unit Math


gruß


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:23 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