[DUG] File handling help in Delphi 5
Vikas...
vikas.image at gmail.com
Wed Dec 5 18:34:16 NZDT 2007
Hi
I am back again. Well i need one help in file handling. May be i sound dump
here but i struck up badly at one point here. Ok let me first explain my
first situation.
I have say 10 files and path is say c:\vikas\file1text upto
c:\vikas\file10.text. I am storyng all this in string list
ok Here is my sample code
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
setlength(Ltextfile, (Ftextfilelists.Count));
for L1 := 0 to Ftextfilelists.Count-1 do
begin
AssignFile(Ltextfile[l1],Ftextfilelists[l1]);
reset(Ltextfile[l1]);
while not Eof(Ltextfile[l1]) do
begin
Readln(Ltextfile[l1]);
while not Eof(Ltextfile[l1]) do
begin
Readln(Ltextfile[l1],Lbuff);
Do something
end;-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
heere ftextfilelists is a string list , ltextfile is an dynamic array of
textfile
Ok my problem here is in Lbuff as u can see i am storing the file
information say file1.txt content and inside this file i have say 20 rows of
information
like this
(***********************************************************************************
1 a vb ssss sdsdadadasdas asdadadasdasd asdadasdasdasdasd
2 aldkasdk;asdk;alskd;aslkd;alkd;alkd;aslkd;askd;askd;alkd;askd
3 asldkas;dk;asdka;sdk;alsdk;alsdk;aslkd;alskd;alskd;alskd;laskd
***********************************************************************************}
Now the problem is the above code takes the value from 2 instead of 1 it
ignores the first row of information and this si what confusing me
I may be sound stupid here but i will apreciate if anyone suggest me
something wrong in my above code logic
Thanks
Vikas
--
vikas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.adventureeducation.co.nz/pipermail/delphi/attachments/20071205/0c148c69/attachment.html
More information about the Delphi
mailing list