![]() |
Inhalt einer Textdatei in ein Array schreiben
Hallo,
wie kann ich den Inhalt einer Textdatei in ein Array schreiben? Der Inhalt sieht so aus: 3;2+1 Ich will nach dem ; splitten und es dann so in ein Array schreiben: Inhalt[0,0] = 3 Inhalt[0,1] = 2+1 Gruß, Schnittcher |
Re: Inhalt einer Textdatei in ein Array schreiben
|
Re: Inhalt einer Textdatei in ein Array schreiben
Hallo,
mir geht es erst darum wie ich es in ein Array bekomme, wie schreibe ich eine Zeile in ein Array? Ich komme immer mit Delphi und VB durcheinander. Gruß, Schnittcher |
Re: Inhalt einer Textdatei in ein Array schreiben
Wenn es ein Array of string ist, dann einfach per Zuweisung.
|
Re: Inhalt einer Textdatei in ein Array schreiben
Hallo,
Inhalt[0,0] = ReadLN(Datei)? Gruß, Schnittcher |
Re: Inhalt einer Textdatei in ein Array schreiben
Zitat:
|
Re: Inhalt einer Textdatei in ein Array schreiben
ich würde mit TStream das ganze in ein Bytearray einlesen:
Delphi-Quellcode:
var
lStream: TStream; lArray: Array of Byte; begin lStream := TFileStream.Create(YourFilename, fmOpenRead); try SetLength(lArray, lStream.Size); lStream.Read(lArray[0], lStream.Size); finally lStream.Free; end; //do anything with the Array |
Re: Inhalt einer Textdatei in ein Array schreiben
Zitat:
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:43 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz