This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: binary/unformatted stdin
2010/4/6 Tobias Burnus <burnus@net-b.de>:
> Mikhail Titov wrote:
>> I guess it is impossible to change FORM while reopening. If one tries to use open(unit=5) after close(5), then file 'fort.5' will be created (tried with gfortran 4.4 under mingw).
>>
>
> You could try:
> ?close(5)
> ?! Windows: "stdin" (?); Unix: "/dev/stdin"
> ?open(5, file='stdin', form='unformatted')
> which could work.
>
Isn't the magic name under Windows "con" ? (It was in the oldish days)
I tried it, though: Fortran runtime error: File 'con' does not exist.
With a name like "stdin" I get an empty ordinary file by that name.
(I get the same runtime error with access = 'stream', by the way)
Regards,
Arjen