<div>Thanks Harris</div>
<div> </div>
<div>your solution solved my problem<br><br> </div>
<div><span class="gmail_quote">On 12/5/07, <b class="gmail_sendername">Kyley Harris</b> <<a href="mailto:kyleyharris@gmail.com">kyleyharris@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Your problem is that you are calling readln once before the while loop, without passing the data to lbuff.. this is reading the first line..
<br><br>I suggest.. scrapping the assign readln method for..<br><br><br>s := TStringList.Create ;<br>s.loadfromfile(AFilename)<br>for i := 0 to s.count -1 do<br>begin<br> lbuff := s[i];<br> dosomething....<br>end;<br><br>
<div class="gmail_quote">
<div><span class="e" id="q_116a8d65b3276afe_1">On Dec 5, 2007 6:34 PM, Vikas... <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:vikas.image@gmail.com" target="_blank"> vikas.image@gmail.com</a>
> wrote:<br></span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div><span class="e" id="q_116a8d65b3276afe_3">
<div><br clear="all">Hi</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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 </div>
<div> </div>
<div>ok Here is my sample code</div>
<div>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
<div>setlength(Ltextfile, (Ftextfilelists.Count));</div>
<div>for L1 := 0 to Ftextfilelists.Count-1 do<br> begin<br> AssignFile(Ltextfile[l1],Ftextfilelists[l1]);<br> reset(Ltextfile[l1]);</div>
<div>
<p> while not Eof(Ltextfile[l1]) do<br> begin<br> Readln(Ltextfile[l1]);<br> while not Eof(Ltextfile[l1]) do<br> begin<br> Readln(Ltextfile[l1],Lbuff);</p>
<p> Do something</p>
<p> end;-</p>
<p>//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p>
<p>heere ftextfilelists is a string list , ltextfile is an dynamic array of textfile </p>
<p>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</p>
<p>like this</p>
<p>(***********************************************************************************</p>
<p>1 a vb ssss sdsdadadasdas asdadadasdasd asdadasdasdasdasd</p>
<p>2 aldkasdk;asdk;alskd;aslkd;alkd;alkd;aslkd;askd;askd;alkd;askd</p>
<p>3 asldkas;dk;asdka;sdk;alsdk;alsdk;aslkd;alskd;alskd;alskd;laskd</p>
<p> </p>
<p>***********************************************************************************}</p>
<p>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</p>
<p>I may be sound stupid here but i will apreciate if anyone suggest me something wrong in my above code logic</p>
<p>Thanks</p>
<p>Vikas</p>
<p> </p>
<p> </p>
<p> </p><br>-- <br> vikas </div></span></div><br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi@delphi.org.nz" target="_blank">
delphi@delphi.org.nz</a><br>Admin: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><span class="sg"><br><br clear="all">
<br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821 </span><br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi@delphi.org.nz">
delphi@delphi.org.nz</a><br>Admin: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br><br clear="all"><br>-- <br> vikas