Silverfrost Forums

Welcome to our forums

READ 'specific' column

26 Nov 2009 11:51 #5440

How to read any specific column from an external file having several columns?

For example, I can read all the three columns by following command:

DO i = 1, n
READ (3,*,IOSTAT=ierr) x(i), y(i), z(i)
END DO

But I understand this wastes the memory if I need only one column, say y(i) or z(i).

Thanks in advance!

26 Nov 2009 12:53 #5442
DO i = 1, n 
READ (3,*,IOSTAT=ierr) xdummy, y(i), zdummy
END DO 
26 Nov 2009 12:58 #5443

Thanks a lot John!

26 Nov 2009 1:12 #5445

Only a comment: We usualy use void for such 'place holders' but this is of course our internal arrangement 😄

Please login to reply.