i think it doesnt work because once u read
Mary at that line , after u use "READ" again, it will automatically change to the next line.
can anybody help me to solve this? thx
how to read the data on the same line
e.g.
if i want to read the number after Mary once I have found Mary in the data file. Because it will read the next line after it found Mary if I want to read the number after Mary.
open(13,FILE='ff.dat')
1010 continue...
one more question:
how to read the data on the same line
e.g.
if i want to read the number after Mary once I have found Mary in the data file.
Mary 100
John 200
Mary 300
Oic, may be I post the complete one.
DATA File:
Here is the inforamtion of Class 1
(blank line)
(blank line)
**********
*Class 1
(blank line)
John 1 100
(blank line)
(blank line)...
May be I say in this way,
how to repeatly search , i.e. once it find * Class 1 , then it can read,
e.g. It found all information in the first "* Class 1, then
if there are many *Class 1 in the following lines, is there any method such that I can repeatly do it.
Thx a lot
Thanks a lot ^^
However, I have the problem that if the part containing
the detail is a long distance after the previous part I want to get, the code is the same?
If I have a file in this format:
Actually this is a long file, I just want to get some data from it.
...........
*
*******************
* Class 1
******************
Name No
John 1
Mary 2
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.