Path: utzoo!attcan!uunet!bu.edu!snorkelwacker!tut.cis.ohio-state.edu!cs.utexas.edu!helios!eemips.tamu.edu From: forrest@eemips.tamu.edu (Bob Forrest) Newsgroups: comp.lang.fortran Subject: Function calls in the middle of subroutine CALLs? -- Is it standard fortran 77 ???? Message-ID: <6381@helios.TAMU.EDU> Date: 6 Jul 90 08:01:47 GMT Sender: usenet@helios.TAMU.EDU Organization: Texas A&M University, College Station Lines: 41 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; However, not all vendors have an extension to Fortran 77 such as %VAL(). Having a C function call in the middle of a Fortran subroutine call works on some vendors platforms. My question is: "Is it part of the FORTRAN 77 standard to be allowed to make function calls in the middle of a subroutine CALL? -- assuming only FORTRAN (I expect mixed language programming such as FORTRAN and C is not part of the fortran 77 standard...)". If anyone knows the answer to whether function calls are allowed in the middle of subroutine calls, I would appreciate them letting me know it. Thanks. bob forrest forrest@ee.tamu.edu -- internet forrest@tamvxee -- bitnet INTEGER BITMAP,IPSVAL,IER,ISIZE,GETVM,IXDIM,IYDIM REAL XLOC,YLOC EXTERNAL GETVM,IPSVAL C other fortran code and ISIZE calculation... C assume for example that we end up having IXDIM = 50 IYDIM = 50 ISIZE = IXDIM*IYDIM C now we call a C routine to allocate the space... IER = GETVM(BITMAP,ISIZE) C the variable BITMAP now contains the address of the beginning C of the dynamically allocated memory. C ...other fortran code... C now the function call IPSVAL() in the middle of the C putdot subroutine call...???? CALL PUTDOT(XLOC,YLOC,IPSVAL(BITMAP),IXDIM,IYDIM) C ... more fortran code...