how to get an allocatable array outside of a subroutine

From: joel GUERRERO (joegi.geo_at_yahoo.com)
Date: 08/09/04


Date: 9 Aug 2004 14:21:08 -0700

Hi,

How I can get an allocatable array outside of a subroutine (that is,
get the values of the allocatable array in the main program).

I'm trying to compile the program but I always get this error:

C:\Fortran projects\testfinal\getvertexandlements.f90(18) : Error: A
dummy argument name is invalid in this context. [XCOORDM]
real,dimension(:),allocatable::xcoordm !

By the way I'm using compaq visual fortan

Joel



Relevant Pages

  • Re: how to get an allocatable array outside of a subroutine
    ... >>get the values of the allocatable array in the main program). ... > to both the subroutine and your main program. ... of these features are not standard Fortran 90/95, ... One notable exception to the foregoing is Salford's FTN95 compiler. ...
    (comp.lang.fortran)
  • Re: Allocating arrays inside a subroutine.
    ... I'm a new Fortran 90/95 user, ... subroutine read_data (filename, data_array) ... if your compiler supports the F2003 ALLOCATABLE array ...
    (comp.lang.fortran)
  • Re: how to get an allocatable array outside of a subroutine
    ... On Mon, 9 Aug 2004, joel GUERRERO wrote: ... > get the values of the allocatable array in the main program). ... to both the subroutine and your main program. ... blocks just using newer f9x conventions. ...
    (comp.lang.fortran)
  • Re: Unidentified memory leak
    ... I think that if the array is an ALLOCATABLE array, it can't leak ... you can just run without having a lot of memory: ... SUBROUTINE S1 ...
    (comp.lang.fortran)
  • Re: same function giving different results
    ... >> I have been looking over and over this again, and my guess would be that the problem is somewhere with the allocatable array I'm using inside my function, but ... >I've found out that the subroutine get_digits returns different results ... > temp = n ... i cannot locate the exact problem... ...
    (comp.lang.fortran)