* Mixed FORTRAN and C I/O
@ 1998-08-17 4:00 Brian McIlwrath
0 siblings, 0 replies; only message in thread
From: Brian McIlwrath @ 1998-08-17 4:00 UTC (permalink / raw)
This a warning to anyone who, like us, might think that they wanted to
mix f77 and C input on a stream (typically stdin). On Sun's and Linux
systems this works just as expected BUT under Digital Unix the f77 RTL grabs
a large chunk (all?) of the input file and provides no way to get at the
contents of its internal buffer!
So given a file
Line 1
Line 2
Line 3
Line 4
etc.
where the first line is read by something like a READ(*,'(A)') LINE
in FORTRAN any attempt to read 'Line 2' etc. in a C routine encounters
EOF instead.
This might seem a rare occurence but in a LARGE system where some FORTRAN
routines are slowly being replaced with C equivalents this can and does
happen!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-08-17 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-17 4:00 Mixed FORTRAN and C I/O Brian McIlwrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox