Xref: utzoo comp.sys.dec:750 comp.lang.fortran:994 comp.lang.c:11991 Path: 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 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