Problem calling a C function from Fortran

Steven J Kassarjian stejk at caen.engin.umich.edu
Tue Aug 23 06:55:00 AEST 1988


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 at caen.engin.umich.edu



More information about the Comp.lang.c mailing list