Einzelnen Beitrag anzeigen

Moon

Registriert seit: 10. Jun 2004
9 Beiträge
 
#10

Re: Bestimmte Bereiche aus .txt-Datei auslesen

  Alt 11. Jun 2004, 13:04
Delphi-Quellcode:
   assignfile('C:\IK\Allgemein.txt')
   reset(dat);
   b:=geszeilen; // gesamt Zeilen hab ich vorher mit ner stringlist und strinlist.count ermittelt
   for znr:=1 to b do
    begin
      ReadLn(dat,astr);
      if (pos('Rang<',astr) <> 0) then // da Rang ohne Zusatz 3x vorkommt
          b:=znr+1;
      if znr=b then
        begin
          posRang:=pos('<',astr);
          Rang:=copy(astr,posRang+23,3);
        end;
    end;
  closefile(dat);
Geht das so in sachen "Programmierstil"? Weil funktionieren tut es schonmal
  Mit Zitat antworten Zitat