This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77 and INQUIRE problem


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]