<p>On Mon, 16 May 2011 10:28:19 +0000, johnelee1944@googlemail.com wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><body>
<p>> thanks all - btw it wasn't the real code just an example I made up , the while loop wasn't needed- mistake! <br />><br />>But the q still remains - having three functions would still give the problem I have now- that when doing a file_read (my function flag=1) would say 'file not open' because the handles are volatile & local to file reset - >that was the point of my original email. Seems as if there is no solution? <br />>John<br /><br />Of course there is. As was stated earlier you need to make the filehandle a global not a local variable. You could also handle it differently and use a TStringList instead. <br /><br />var<br /> s: TStrings;<br /><br />s := TStringList.Create;<br />s.LoadFromFile('MyFile.txt');<br />//do something with line 12<br />writeln(s[12]);<br />s.Free<br /><br /><br />Regards, Darius</p>
</body></blockquote><p></p>