This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g77 and INQUIRE problem
- To: gcc at gcc dot gnu dot org
- Subject: g77 and INQUIRE problem
- From: "Jacek M. Holeczek" <holeczek at us dot edu dot pl>
- Date: Mon, 20 Mar 2000 10:47:54 +0100 (MET)
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.