This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
OPEN statement in Fortran (g77)
- From: "Prof. M.B. Patil" <mbpatil at ee dot iitb dot ac dot in>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: bug-gcc at gnu dot org
- Date: Fri, 12 Sep 2003 19:27:56 +0530 (IST)
- Subject: 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