Re: how to get an allocatable array outside of a subroutine

From: Herman D. Knoble (SkipKnobleLESS_at_SPAMpsu.DOT.edu)
Date: 08/11/04


Date: Wed, 11 Aug 2004 08:49:06 -0400

Joel: The code formerly posted by Michael Metcalf at:

http://ftp.cac.psu.edu/pub/ger/fortran/hdk/dyng.f90

allocates an array in a subprogram to a size specified in the main program
and then uses it in the main program. Since it is Standard Fortran 90
it should work with any compiler supporting Fortran 90 (including
the free F-Compiler).

Apologies if I misunderstood your question.

Skip Knoble

On 9 Aug 2004 14:21:08 -0700, joegi.geo@yahoo.com (joel GUERRERO) wrote:

-|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

   Herman D. (Skip) Knoble, Research Associate
   (a computing professional for 38 years)
   Email: SkipKnobleLESS at SPAMpsu dot edu
   Web: http://www.personal.psu.edu/hdk
   Penn State Information Technology Services
    Academic Services and Emerging Technologies
     Graduate Education and Research Services
   Penn State University
     214C Computer Building
     University Park, PA 16802-21013
   Phone:+1 814 865-0818 Fax:+1 814 863-7049



Relevant Pages

  • Re: Large array using RH9 / ifort 8.0
    ... under Red Hat 8 and Intel compiler Version 8.0.039.042 with N=250000000 ... -|Have you tried using an Allocatable global array in a module? ... -| Penn State Information Technology Services ... Penn State Information Technology Services ...
    (comp.lang.fortran)
  • Re: Array Fundamentals
    ... When a value-type object is created, C# allocates a single ... the values inside an Array should be allocated ... reside on the heap ... >type is that only the reference type exist on the heap. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Framework 2.0 array redim unsatisfactory performance
    ... I am not talking about "array redim" anymore. ... ReDim simply allocates a new ... but I do not even attempt to test its memory ...
    (microsoft.public.dotnet.languages.vb)
  • bug in debugger?
    ... The code allocates an array of structures: ... and I have a function that allocates the arrays. ... variables on other installations on other machines and have gotten the ... Any advice would be appreciated as I'm about to revert back to VC6. ...
    (microsoft.public.vc.debugger)
  • Re: Memory Lifetime in Interop
    ... large value (so it allocates say a 128 Megabyte array), the memory allocated ... garbage collection when the function returns control to the client) and one ... From watching> the memory heap, if I set dynamic_value in the .NET code to be a rather> large value (so it allocates say a 128 Megabyte array), the memory> allocated ...
    (microsoft.public.dotnet.framework.interop)