Silverfrost Forums

Welcome to our forums

retired NEWBIE trying to use OPEN in FTN

13 May 2008 11:39 #3184

These 2 OPEN statements OPEN(unit=9,FILE='dale.txt',STATUS='NEW')
OPEN(unit=8,FILE='mm.txt',STATUS='READONLY')

dale.txt gets created at C:\Plato I get this error Runtime error from program:c:\plato\checkmate\win32\test2.exe Run-time Error *** Error 128, File does not exist

READFILE - in file test2.for at line 14 [+00f2]

main - in file test2.for at line 4 [+0039]

file mm.txt does exist at c:\Plato any ideas what I am doing wrong?

14 May 2008 12:40 #3185

Two ideas,

  1. compile with /debug to get the line number.
  2. use iostat=iostat in open statements to control the error response.

OPEN(unit=9,FILE='dale.txt',STATUS='NEW',IOSTAT=iostat) if (iostat /= 0) then CALL FORTRAN_ERROR_MESSAGE@(iostat, MESSAGE) write (,) iostat, message end if ...

You may be having problems with STATUS=... STATUS='UNKNOWN' is much more friendly.

14 May 2008 10:14 #3188

😄 😄

Please login to reply.