Autor Beitrag
Wolle92
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Sa 08.09.07 14:45 
Hallo,
kann mir jemand erklären, wieso 1.7 kein gültiger Real-Wert sein soll??
ausblenden Delphi-Quelltext
1:
prices[i-1] := StrToFloat(Replace(TLabeledEdit(Form1.Components[i]).Text,',','.'));					

Replace habe ich selber definiert und die Funktion funktioniert auch... prices ist ein Array of Real
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 08.09.07 14:48 
Weil DecimalSeperator auf ',' steht und nicht auf Punkt und demnach StringReplace unnötig ist?

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Sa 08.09.07 17:40 
doch, ist nötig, weil man manchmal auch nen punkt schreibt, statt komma...
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 08.09.07 17:44 
Öm..., ja, aber dann musst du nicht Komma zu Punkt, sondern Punkt zu Komma ersetzen :roll:

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Sa 08.09.07 18:27 
ja, ok, danke... komische Programmiersprache