g77 and INQUIRE problem
Jacek M. Holeczek
holeczek@us.edu.pl
Mon Mar 20 01:48:00 GMT 2000
Hi,
I am porting some kind of a fortran package to Linux g77 (egcs-2.91.66,
19990314/Linux, egcs-1.1.2 release, RH6.1/i386).
One of routines contains :
------------------------------------------------
CHARACTER*20 RW
INQUIRE (IO,ACTION=RW)
IF (RW.EQ.'READ') THEN
...
ELSE
...
ENDIF
------------------------------------------------
That means I need a way to find out whether the file "IO" was opened for
READ or WRITE. Unfortunately the INQUIRE on Linux does not accept the
ACTION feature.
Could someone, please, tell me how can I solve it ?
Note - I DO NOT need to check the file's mode ("rwx"), I need to find out
whether the program that called this routine opened the file in READ or
in WRITE mode.
Thanks in advance,
Jacek.
More information about the Gcc
mailing list