Position pointer in I/O
Position pointer in I/O
(OP)
Hi all,
When you read data from a data file (txt file), how can you move the position pointer to the n row of the data (without reading each row again and again)?
For I am writing a program to put the n row of the data into an array, I am currently repeating
read (101,*)
n-1 times to get rid of the data I don't need, but that is inefficient, isn't it?
Thanks in advance.
When you read data from a data file (txt file), how can you move the position pointer to the n row of the data (without reading each row again and again)?
For I am writing a program to put the n row of the data into an array, I am currently repeating
read (101,*)
n-1 times to get rid of the data I don't need, but that is inefficient, isn't it?
Thanks in advance.





RE: Position pointer in I/O
Sequential access, and
Direct access
You may read a bit on it anywhere, here are 3 links.
http:
htt
http://f
I personally have not used Direct access much. I usually think of it for reading huge binary files; which I have no need for.
Read the links above carefully, for Direct access apparently the records in the file all need to be of the same length.
RE: Position pointer in I/O