Xref: utzoo comp.lang.c:18338 comp.lang.fortran:2005 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!amdcad!crackle!tim From: tim@crackle.amd.com (Tim Olson) Newsgroups: comp.lang.c,comp.lang.fortran Subject: Re: Calling FORTRAN from C (Was: Need matrix inversion C routine). Message-ID: <25509@amdcad.AMD.COM> Date: 3 May 89 23:42:50 GMT References: <2846@tank.uchicago.edu> <5785@cbnews.ATT.COM> <10087@smoke.BRL.MIL> <1544@auspex.auspex.com> <1278@l.cc.purdue.edu> Sender: news@amdcad.AMD.COM Reply-To: tim@amd.com (Tim Olson) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 23 Summary: Expires: Sender: Followup-To: In article <1278@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: | I have used several operating systems before UNIX. On all of them, a name | was a name was a name. The program cards and subroutine cards in Fortran | produced names in the object file identical to what appeared on the card. | Entry names and COMMON block names likewise. Assembler-produced programs | did the same thing. If I was going to use an Algol program it would still | be the same. The calling sequence was a problem, even between Fortrans. | But not the names. If an underscore is not prepended (or the names changed in some standard unique way), then you run into the problem of potential name-space conflicts with the assembly-level "helper" routines that almost always exist. These routines include "start" (the beginning of crt0, which gets control and sets everything up for your program), help for non- or undersupported intrinsics like unsigned modulo, short multiplies, etc. If this were not done, then a user would just get mysterious "multiply-defined" errors from the link of his program. -- Tim Olson Advanced Micro Devices (tim@amd.com)