ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fortran runtime error: end of file


From: Leon Maurer
Subject: Fortran runtime error: end of file
Date: Fri, 24 Apr 2015 22:45:39 -0500

Hello everyone,

I have a strange problem. Consider the following fortran program:

program test   
    real :: arg
    
    open(unit=1,file='test.txt',status='unknown')
    read(1,*) arg
    print *, arg
    close(1)
endprogram

test.txt simply is one line with a floating point number -- such as 50e-9. If I compile and run the code on its own, everything is fine:

$ f95 -g -o test test.f90 
$ ./test
   5.00000006E-08

However, if I run the program within DDD, I get

At line 5 of file test.f90 (unit = 1, file = 'test.txt')
Fortran runtime error: End of file
[Inferior 1 (process 16664) exited with code 02]

Does anyone know why the program works fine when run outside DDD but gives an error when run inside DDD?

Thanks for your time.
-Leon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]