Autor Beitrag
Jojojoxx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Do 09.12.10 13:29 
Hallo zusammen!

Gibt es schon fertige Prozeduren von Delphi, die bei Ausgabe einer Zahl auf ein Label nach den Tausender-Stellen automatisch einen Punkt einfügen?
Beispiel:
Ich will "57891,24" ausgeben. Daraus soll dann werden "57.891,24".
Bietet Delphi dafür schon irgendwo Prozeduren, sonst implementiere ich es selber.
Danke euch!
mfg

Jojo
platzwart
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1054
Erhaltene Danke: 78

Win 7, Ubuntu 9.10
Delphi 2007 Pro, C++, Qt
BeitragVerfasst: Do 09.12.10 13:46 
Z.B. so:

ausblenden Delphi-Quelltext
1:
Result:= Format('%.0n', [DeinInteger / 1]);					

_________________
Wissenschaft schafft Wissenschaft, denn Wissenschaft ist Wissenschaft, die mit Wissen und Schaffen Wissen schafft. (myself)
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Do 09.12.10 16:52 
Hi!

Danke, das klappt zwar, aber ich verliere bei meinen Floats die Nachkommastellen...
mfg

Jojo
zuma
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 660
Erhaltene Danke: 21

Win XP, Win7, Win 8
D7 Enterprise, Delphi XE, Interbase (5 - XE)
BeitragVerfasst: Do 09.12.10 17:00 
schau dir mal FormatFloat, Format-strings, Formatsettings in der Hilfe an

_________________
Ich habe nichts gegen Fremde. Aber diese Fremden sind nicht von hier! (Methusalix)
Warum sich Sorgen ums Leben machen? Keiner überlebts!
Jojojoxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Do 09.12.10 17:11 
Das hat mir geholfen!
Danke :-)