home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: 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
-
- 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
-