Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tab formatted file

Status
Not open for further replies.

blu0r23

Programmer
Feb 22, 2006
1
JP
I want to read a file, in which in each line are one pair of numbers. unfortunatly those are seperated used a tab.
example:
1 2

There are a lot of pairs, so the numbers will get quite large, like:

1234 666

I dont have a clue how to read those numbers! Everytime I try, i get an input conversion error.

read(unit=1,"(2i8)",iostat=ios) tmp1, tmp2
this for example doesnt work.

I work with Fortran 90
Has anybody an idea?

many thanks in advance!
 
Use free format (works in F77 too)
Code:
read (unit=1, *, iostat=ios) tmp1, tmp2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top