Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HELP !! error while extracting data from a file using FORTRAN,

Status
Not open for further replies.

B4M

Member level 2
Joined
Aug 3, 2016
Messages
47
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
318
Hallo!
I would like to extract some data from a file using FORTRAN, BUT I keep getting this error
Code:
Fortran runtime error: Format present for UNFORMATTED data transfer

Error termination.
I have been looking for an answer in google but until now nothing seems to work, and I would be very grateful if you could help me to solve this issue!
Thank you!
 

I'm unsure if a coding question without any meaningful code deserves an answer.

The error message seems to say that you are defining an unformatted file and accessing it with formatted read statements, which indeed won't work.
 

Thank you for your reply!
the code I am using is
Code:
OPEN (19, FILE="OnSp.mat", FORM='UNFORMATTED')
As you can see I am specify the format to be Unformatted ,that it is why the error seems very strange 8-O
Hope any body can help!
Thank you!
 

Now show the related read statement. Guess it has a format specification and causes the runtime error.
 

Thank you!
Code:
OPEN (19, FILE="OnSp.mat", FORM='UNFORMATTED')
READ (19,*) VERSION
READ (19,*) MDCHECK
 

List directed read "READ( unit, *)" is formatted read. Review your FORTRAN manual or text book.

I wonder how you arrived at your code. Is it based on an example or written from the scratch? There are also differences of supported FORTRAN standard between compilers, e.g. F95 versus F77.
 
  • Like
Reactions: B4M

    B4M

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top