🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4572

Re: HELP: calling c from fortran 77

#4572
From: Brent Benson
Date: Fri, 08 Jan 1993 13:58
20 lines
1123 bytes
jayas@ee.umanitoba.ca (Rohitha P. Jayasinghe) writes:

> Is it possible to call a C subroutine from fortran 77?  If so, how
> can that be done?

That depends on your implementation.  In Harris Fortran 77 you can
declare a function as CEXTERNAL and then call it using %VAL() to pass
arguments by value rather than reference.

	cexternal setpriority
	integer*4 setpriority, prio_user, status
	parameter (prio_user=2)

	status = setpriority (%val(prio_user), %val(5005), %val(3))


	
--
Brent Benson                     
Harris Computer Systems
Technical Details
Message-ID: <BRENT.93Jan8085810@rcx1.ssd.csd.harris.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!mlb.semi.harris.com!travis.csd.harris.com!grouper!grouper!brent
References: <C0IBxD.JL3@ccu.umanitoba.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.fortran
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!mlb.semi.harris.com!travis.csd.harris.com!grouper!grouper!brent
From: brent@ssd.csd.harris.com (Brent Benson)
Subject: Re: HELP: calling c from fortran 77
Organization: Harris Computer Systems
Date: Fri, 8 Jan 1993 13:58:10 GMT
Message-ID: <BRENT.93Jan8085810@rcx1.ssd.csd.harris.com>
In-Reply-To: jayas@ee.umanitoba.ca's message of Thu, 7 Jan 1993 23:29:37 GMT
References: <C0IBxD.JL3@ccu.umanitoba.ca>
Sender: news@grouper.mkt.csd.harris.com (Network News)
Lines: 20