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!

one more READ ?

Status
Not open for further replies.

bobo12

Programmer
Dec 26, 2004
74
US
READ (11,FMAT3,END=20) (ITEM(J), J = 1,NI)
ok so 11 is file descriptor, FMAT3 & ITEM[] are variable in my program,
so would someone explain what the read operation is doing?
i mean, how are FMAT3 & ITEM[] related to the file read operation. are contents of the file stored in array ITEM[] or in FMAT3?
 
In C, this reads
Code:
char* FMAT3 = "%d";
for (j = 1; j <= ni; j++)
{
   if (feof(chan11)) goto label20;
   fscanf (chan11, FMAT3, item[j]);
}
FMAT3 is the format probably something like '(I3)'
Result is stored in ITEM.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top