Control-D not closing unit 5 in list-directed input

Jerry DeLisle jvdelisle@verizon.net
Fri Jan 25 22:29:00 GMT 2008


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



More information about the Fortran mailing list