Re: Passing allocatable arrays into subroutine outside argument list
From: Bill Bertram (wkb_at_aansto.gov.au)
Date: 06/02/04
- Next message: Sergiy Kanilo: "Re: Orthogonal polynomials for function of (x,y)"
- Previous message: jasmine: "Re: num. method for partial integration?"
- In reply to: mjodoin: "Passing allocatable arrays into subroutine outside argument list"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Jun 2004 08:17:03 +1000
"mjodoin" <mjodoin@ets.org> wrote in message news:29i87mlxfgxj@legacy...
> I am using Compaq Visual Fortran.
>
> I need to pass an allocatable array into a subroutine that in turn is
> called by a IMSL optimization routine. Thus, I can not add the array
> to the argument list since the IMSL routine specifies 3 particular
> variables. I also can't specify the allocatable array in a COMMON
> block. Any other ideas other than overspecifying the allocatable
> array?
Hi,
This question is best addressed to comp.lang.fortran. However, I have come
across this problem before, also involving an IMSL subroutine. One easy
way to solve it is by using a MODULE instead of a COMMON block. In a MODULE
you can declare variables ALLOCATABLE. You then USE that module in the
subroutine that calls the IMSL routine to allocate and deallocate the
variables.
Cheers,
Bill
- Next message: Sergiy Kanilo: "Re: Orthogonal polynomials for function of (x,y)"
- Previous message: jasmine: "Re: num. method for partial integration?"
- In reply to: mjodoin: "Passing allocatable arrays into subroutine outside argument list"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|