BSD 4.3 F77 fortran query

Chuck Karish karish at denali.stanford.edu
Tue Jul 12 00:35:23 AEST 1988


In article <584632927.3487 at bucasb.bu.edu> mike at bucasb.bu.edu (Michael Cohen) writes:
>Does anybody know an easy way to popen a stream which can be passed
>to Fortran and associated with a fortran Unit,.  This is for a version
>of BSD4.3 F77.  What was already tried was a fortran open followed
>by a dup2 using the fortran unit as a file descriptor as passed to C.

	There's no really portable way to do this, even among different
	ports of 4.x.  A colleague of mine wrote some code to do this
	under 4.2.  It uses low-level calls within the stdio library,
	and depends on knowledge of exactly how a file descriptor and a
	FORTRAN logical unit are implemented.  

	When I ported the code to Convex Unix (on a binary-only
	system), I had to guess about the changes in the internal
	interface.  I got lucky, and it worked for a while.  There's
	nothing to keep Convex from streamlining their stdio library
	and replacing or changing the name of one crucial interface, at
	which point my code dies.

Chuck Karish	ARPA:	karish at denali.stanford.edu
		BITNET:	karish%denali at forsythe.stanford.edu
		UUCP:	{decvax,hplabs!hpda}!mindcrf!karish
		USPS:	1825 California St. #5   Mountain View, CA 94041



More information about the Comp.unix.questions mailing list