Namelist read from stdin
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Jan 8 22:50:00 GMT 2019
On Tue, Jan 08, 2019 at 11:14:50PM +0100, Harald Anlauf wrote:
>
> namelist read from stdin (unit 5) mostly works as from file,
> but I've found a case where the reading seems to get confused
> during error recovery. This may lead to skipped (lost) namelists.
>
What do you mean by error recovery?
> This seems clearly restricted to unit 5, and requires that a
> badly formatted namelist is encountered, otherwise it is fine.
>
> Is this due to lack of or issues with buffering of STDIN?
> GFORTRAN_UNBUFFERED_PRECONNECTED=y/n does not seem to have any
> influence.
>
> Is there something trivial I've overlooked? Otherwise I'll prepare
> a PR.
AFAIK, stdin is not seekable. If the error recovery you
mention requires rewinding to an earlier place in the
file stream, you're done.
--
Steve
More information about the Fortran
mailing list