Autor Beitrag
CrOc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

Win XP
D5 Standard
BeitragVerfasst: Mo 01.12.03 19:23 
Hi,
wie kann ich z.B. die dritte Zeile aus einer txt - Datei lesen?
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.12.03 19:28 
Lad das ganze Ding in eine StringListe und les den driten String aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
var
  sl: TStringList;
  s: String;
begin
  sl := TStringList.Create;
  try
    sl.LoadFromFile('foo.txt');
    s := sl.Strings[2]
  finally
    FreeAndNil(sl);
  end;
  ShowMessaage(s);
CrOc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

Win XP
D5 Standard
BeitragVerfasst: Mo 01.12.03 19:44 
thanks
superchatti
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 296

Win XP, Red Hat Linux 7.3
Delphi 6 PE
BeitragVerfasst: Mo 01.12.03 20:30 
Zu dem Thread hab ich auch eine Frage:

Ich möchte, dass wenn ein Wort (z.B. Klo) kommt von dem wort an, aber nicht das Wort selber (!!!) kopiert wird bis /Klo

_________________
mfG Superchatti
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.12.03 20:35 
Siehe Hilfe zu pos und copy.