Autor Beitrag
colaka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 200
Erhaltene Danke: 4

Win XP, W7
Delphi 2005 Prof.
BeitragVerfasst: Mi 05.08.09 22:11 
Hallo,

ich möchte aus einer Textdatei das Preisfeld in meine Tabelle kopieren. In meiner Tabelle wird der Preis als Integer in Cent angegeben, doch in der Textdatei stehen die Preise in Euro mit einem Punkt als Dezimaltrenner. Das sieht dann beispielsweise so aus: .9, 1.5, 25 oder 12.85. Ich habe bereits eine Lösung gefunden mit if, pos und copy, doch da die Tabelle ca. 62.000 Artikel hat, dauert die Umwandlung ewig.

Kann mir hier vielleicht jemand sagen, wie ich das Problem möglichst elegant bzw. effizient lösen kann?

Danke Ebi
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mi 05.08.09 22:12 
DecimalSeperator = '.' (einmal vorher)

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
colaka Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 200
Erhaltene Danke: 4

Win XP, W7
Delphi 2005 Prof.
BeitragVerfasst: Mi 05.08.09 23:35 
Danke,

das war auf den Punkt
Jakob_Ullmann
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: Do 06.08.09 11:08 
user profile iconuall@ogc hat folgendes geschrieben Zum zitierten Posting springen:
DecimalSeperator = '.' (einmal vorher)


falls sich sonst jemand über ne Fehlermeldung wundert: es muss natürlich ein a sein. (komisch, unsere Englisch-Referendarin hat den Fehler auch oft gemacht).
Delphi-Laie
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1600
Erhaltene Danke: 232


Delphi 2 - RAD-Studio 10.1 Berlin
BeitragVerfasst: So 14.07.13 21:18 
user profile iconJakob_Ullmann hat folgendes geschrieben Zum zitierten Posting springen:
user profile iconuall@ogc hat folgendes geschrieben Zum zitierten Posting springen:
DecimalSeperator = '.' (einmal vorher)


falls sich sonst jemand über ne Fehlermeldung wundert: es muss natürlich ein a sein. (komisch, unsere Englisch-Referendarin hat den Fehler auch oft gemacht).


Manchmal hilft ein Blick über den Tellerrand, bei Sprachen in eine andere, hier konkret in's Französische: (chambre) séparée!