Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Open statement causes crash, ignores Err=...

$
0
0

My Fortran DLL writes a .csv file that users can open in Excel.  Sometimes the users may already have an earlier copy open in Excel, so I need to avoid crashing the program if it can't write a file which is already open in another application.  The following statement worked fine in Compaq Fortran, but now with Intel Parallel Studio XE 2013, the program crashes if the file is open in another application.

OPEN(16,FILE=csvfile,STATUS='unknown',err=199)

(line 199 initiates a graceful exit from the subroutine)

Any idea why the err=199 doesn't work?  Is there another way to accomplish the same thing?


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>