Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi FormatFloat problem :) (https://www.delphipraxis.net/123762-formatfloat-problem.html)

arcangel 7. Nov 2008 23:52


FormatFloat problem :)
 
hi, was ist hier falsch? :)
Delphi-Quellcode:
lblliefererrabatt.Caption := FloattoStr(FormatFloat('0,00', lrabatt)+' €';
lrabatt hat nen gleitkommawert gespeichert...

NineBerry 7. Nov 2008 23:58

Re: FormatFloat problem :)
 
Punkt statt Komma!



Delphi-Quellcode:
lblliefererrabatt.Caption := FloattoStr(FormatFloat('0.00', lrabatt)+' €';

arcangel 8. Nov 2008 00:01

Re: FormatFloat problem :)
 
daran liegts leider nicht^^
-->
[Fehler] Unit1.pas(203): Es gibt keine überladene Version von 'FloatToStr', die man mit diesen Argumenten aufrufen kann

NineBerry 8. Nov 2008 00:03

Re: FormatFloat problem :)
 
Delphi-Quellcode:
lblliefererrabatt.Caption := FormatFloat('0.00', lrabatt)+' €';
Doppelt gemoppelt hält nicht besser :wink:

arcangel 8. Nov 2008 00:09

Re: FormatFloat problem :)
 
dankesehr :)
ich war die ganze zeit im glauben das ich mit formatfloat nur die formatierung mach ;D

Chemiker 8. Nov 2008 00:13

Re: FormatFloat problem :)
 
Hallo arcangel,

wenn Du auch die Tausendertrennzeichen haben willst dann so:

Delphi-Quellcode:
lblliefererrabatt.Caption := FormatFloat('###,.00', lrabatt)+' €';
Bis bald Chemiker

arcangel 8. Nov 2008 00:15

Re: FormatFloat problem :)
 
alles klar, vielen dank, problem gelöst :)


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