hi !
On Jun 27, 8:02 pm, Beliavsky <beliav...@xxxxxxx> wrote:

I have had the idea of declaring these arrays once in the main program
itself and passing them everytime.. that way it will be declared only
once..But that would put something totally out of place in the main
program...Hence i would like to know of some other way if it's

This is the traditional approach -- such arguments are called
workspace arrays. An alternative is MODULE variables, with the PRIVATE
attribute, declared ALLOCATABLE, placed in the module containing the
subroutine that uses them.

right.. but does that alleviate my problem of having to allocate it
every time the module gets called..??



Relevant Pages

  • Re: Derived type name as a dummy argument - possible?
    ... Dan Nagle wrote: ... but passing a derived type name as a dummy argument does not ... data structures without having to modify the generic subroutine. ...
  • Re: Intel Mac and Snowleopard simple pascal?
    ... Salmon Egg wrote: ... When you call a subroutine by a variable such as X in ... place the address of a series of related procedures in an array, ... passing a variable to the procedure. ...
  • Re: null terminated strings
    ... a call to those in a subroutine. ... The compiler will then insure that you're passing the proper data type. ... I'm having trouble thinking of the few times that I passed something to a routine, and had the routine treat it as another type of data. ... Passing the address of an AST handler routine when setting up an AST timer routine was interesting. ...
  • Re: Does the order of declarations matter?
    ... >> subroutine sub ... >No, these are two different types of arguments - IIRC, one is assumed-size ... passing it as a separate argument. ... an explicit interface is always safer. ...
  • Re: DBI prepare and fetch
    ... > statement handle on return so it can be passed adcross with subroutine ... Passing a statement handle is less memory intensive than passing ... How do you bind parameters to a statemnet ...