Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!bu.edu!snorkelwacker!spdcc!merk!alliant!linus!think!compass!worley From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.fortran Subject: Function calls in the middle of subroutine CALLs? -- Is it standard fortran 77 ???? Message-ID: <2388@compass.com> Date: 9 Jul 90 15:18:48 GMT Organization: Compass, Inc., Wakefield, MA Lines: 23 In-reply-to: forrest@eemips.tamu.edu's message of 6 Jul 90 08:01:47 GMT forrest@eemips.tamu.edu (Bob Forrest) writes: > I want to dynamically allocate memory in fortran by using > mixed languages (C and FORTRAN). In so doing, I need to pass > a value contained in a variable to other routines by value instead > of by address -- %VAL(variable_name) under several vendors extensions to > Fortran 77; A more portable solution is to pass the variable by address (that is, call the C routine in the ordinary Fortran way), but have the C routine fetch the value from its location. This leaves your Fortran completely portable and your C only somewhat less so -- fetching a value from an address is C is easy. > "Is it part of the FORTRAN 77 standard to be allowed to make function > calls in the middle of a subroutine CALL? Yes. Unless Fortran 77 is crazy... Dale Worley Compass, Inc. worley@compass.com -- The United States has entered an anti-intellectual phase in its history, perhaps most clearly seen in our virtually thought-free political life. -- David Baltimore