reading data from txt file in fortran

前端 未结 6 1336
渐次进展
渐次进展 2020-12-17 23:53

I am writing a FORTRAN program that reads data from a text file and writing it to the console. the data file looks something like this

1234567890123456 12345         


        
6条回答
  •  长情又很酷
    2020-12-18 00:00

    The reason is that you're specifying a width that is too small for the real numbers. Usually when the width doesn't fit, fortran will display asterisks, which happens in your case.

    You have 9 digits, but you'll need at least 10, since the comma takes up a column as well. So replacing 3F9.3 with 3F10.3 should do the trick.

提交回复
热议问题