Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: bkm@bkmpc.bnsc.rl.ac.uk (Brian McIlwrath)
Subject: Mixed FORTRAN and C I/O
Date: 1998/08/17	[thread overview]
Message-ID: <6r9a7q$1e5k@newton.cc.rl.ac.uk> (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!



                 reply	other threads:[~1998-08-17  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox