This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

OPEN statement in Fortran (g77)


Dear Sir/Madam,

A question about OPEN statement in Fortran:

The following does not seem to work:
      open (unit=1,file='~/xyz/try2.in',status='old')

The error message I get is the following:

open: No such file or directory
apparent state: unit 1 named ~xyz/try2.in
lately writing direct unformatted external IO
Aborted

      open (unit=1,file='/home/username/xyz/try2.in',status='old')
does work.

Also,
      open (unit=1,file='/home/username/xyz/try2.in',status='old')

In other words, a reference to the home directory with tilde (~)
is not liked by the compiler. (I checked that '../xyz/abc' works
fine with the OPEN statement.)

Please let me know if there is a way out.

Thanks.
Mahesh Patil



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