Fortran runtime error: end of file
Leon Maurer <[email protected]> Fri, 24 Apr 2015 22:45:39 -0500
| Newsgroups | gmane.comp.debugging.ddd.general |
|---|---|
| Message-ID | <CABoy74kZf3XxJU+EbqBZPrz6nCyA=Yh16nc7m8XZ-4RJLBDMkg@mail.gmail.com> |
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