This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]