This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Control-D not closing unit 5 in list-directed input
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: John Nabelek <nabelek at coas dot oregonstate dot edu>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 25 Jan 2008 13:48:26 -0800
- Subject: Re: Control-D not closing unit 5 in list-directed input
- References: <338872C4-DBC5-47E5-9902-BE84EB9169A9@coas.oregonstate.edu>
John Nabelek wrote:
I would like to report a problem in gfortran IO.
Normally (in f77, g77) one could enter Control-D to close unit 5 for
input (and thus accept default values).
In gfortran this works for 'formatted' input but not 'list-directed' input.
With a statement such as
read(5,*,iostat=ios) number
entering Control-D has no effect. The program just sits at this
statement and does not continue. In f77 and g77, Control-D at this line
would close unit 5 and continue execution.
Would it be possible to make gfortran behave as f77 and g77 did?
Cheers -John
Can you provide a small working example of a complete program so that I can
explore this?
How do you define a "default value" ?
Jerry