fortran90 - reading a variable into an open file -


I'm very new to Fortran and Stack Overflow .. I want to use Fortran for an assignment but I stuck with it. Run time errors .. Any help would be greatly appreciated

I am trying to read two variables in a file that I have opened. This is a sample code given by my professor, but it shows run time error Please help

  sub-root input_data any real * 8a, b open (unit = 5, file (5, *) A, B pass (5) Return End   

This shows the runtime error on the read line.

I assume that you are reading to file if so, your Your position in the open statement is not known "Old" like:

  open (unit = 5, file = 'inputdata.dat', condition = 'old')   

The situation will be "unknown" if the file does not exist, then try to create a file, and then try it since, since it was created now, there is nothing in that file, and therefore, you get an error.

The status "old" tells you that the file does not exist, if you get an error the file ... does not exist :)

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -