🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.dec
Article #5012

Re: Problem calling a C function from Fortran

#5012
From: Steven J Kassarjian
Date: Mon, 22 Aug 1988 20:55
33 lines
1704 bytes
In general, what happens when the caller and the subroutine
disagree as to the argument list of the subroutine.
Specifically, the main body of the program called the
subroutine like this
...
      CALL CONFUS (A, B, C)
...
while the subroutine was defined this way
      SUBROUTINE CONFUS (A, B)
....

What happened was that C was always zero, though I think that
this is due to the compiler initializing C to zero.

I am interested in what would (and probably did) happen, with
all the nitty-gritty (and dirty) details.  :-)

Also, what would happen in the reverse case (where the caller
doesn't supply an argument)?

Thanks (in advance) for the info.
steve.

p.s. how do you start a new discussion, with a new title, etc.?

                        steve kassarjian
+-----------------------------------------------------------------+
| All opinions are                        Eunichs:  the operating |
| local and undefined                                  system for |
| outside of unit.                                      real men. |
+-----------------------------------------------------------------+
                    stejk@caen.engin.umich.edu
Technical Details
Message-ID: <3e0459f9.13370@dow4.engin.umich.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!caen.engin.umich.edu!stejk
References: <1134@ssc-bee.ssc-vax.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!caen.engin.umich.edu!stejk
From: stejk@caen.engin.umich.edu (Steven J Kassarjian)
Newsgroups: comp.sys.dec,comp.lang.fortran,comp.lang.c
Subject: Re: Problem calling a C function from Fortran
Summary: what happens?
Keywords: Fortran, C, external function in Fortran
Message-ID: <3e0459f9.13370@dow4.engin.umich.edu>
Date: 22 Aug 88 20:55:00 GMT
References: <1134@ssc-bee.ssc-vax.UUCP>
Organization: U of M Engineering, Ann Arbor, Mich.
Lines: 32