zamani86
Programmer
- Jul 9, 2015
- 2
Hi.
I was a compaq visual fortran user.Now i'm using the visual studio 2012 and PGI visual fortran 2012. My Windows is 7, 64bit. But i have problem with READ and WRITE commands.
for example a simple code for WRITE:
integer a
open(unit=1, file='aaa.txt',status="new")
read*,a
write(1,*) a
"runtime error: severe 10 :cant overwrite existing file"
and a simple code for READ: (aaa.txt just has one array)
real a
open(unit=1, file='aaa.txt',status="old")
read(1,*)a
print *,a
"runtime error: 24 :end of file during read"
generally, My last codes don't work true in the new environment. what's your idea?
thanks.
I was a compaq visual fortran user.Now i'm using the visual studio 2012 and PGI visual fortran 2012. My Windows is 7, 64bit. But i have problem with READ and WRITE commands.
for example a simple code for WRITE:
integer a
open(unit=1, file='aaa.txt',status="new")
read*,a
write(1,*) a
"runtime error: severe 10 :cant overwrite existing file"
and a simple code for READ: (aaa.txt just has one array)
real a
open(unit=1, file='aaa.txt',status="old")
read(1,*)a
print *,a
"runtime error: 24 :end of file during read"
generally, My last codes don't work true in the new environment. what's your idea?
thanks.