Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

How to read multiple data without changing line?

$
0
0

Dear all,

I have a file without fixed number of data in every line. The example data are as follows:

0 0 0 30 45 0.2 0.001 5 0.005 0 0 1

0 0 1 0 0 0.2 0.001 1

For every line, if the eighth number is greater than 1, there are 4 data to be read, else if eighth number is equal to 1, there is no any data after that number.

How to design read format to read this kind of data?

Thanks,

Zhanghong Tang

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>