Re: Allocatable Arrays As Outputs
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Wed, 30 Jan 2008 13:34:21 -0800
Craig Dedo <cdedo@xxxxxxxxx> wrote:
Using allocatable arrays is preferable to using pointers to
allocatable arrays, as suggested by another poster. Direct use of
allocatables is easier to understand and easier to avoid troublesome
mistakes.
While I agree with the above advise in general, please note that none of
the other posters suggested using pointers to allocatables.... unless
there was some post that didn't (yet?) make it to my server. There was a
suggestion to use pointer instead of allocatable, but that's a different
thing. (I recommend against it also).
In order to use allocatables in your procedures, you need to add the
"Allocatable" attribute to the declaration of your arrays in the main program.
E.g., you would write:
Character (Len=8), Allocatable :: propertyNames(:)
And the explicit interface, as mentioned by others.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: Allocatable Arrays As Outputs
- From: Infinity77
- Re: Allocatable Arrays As Outputs
- References:
- Allocatable Arrays As Outputs
- From: Infinity77
- Re: Allocatable Arrays As Outputs
- From: Reinhold Bader
- Re: Allocatable Arrays As Outputs
- From: Craig Dedo
- Allocatable Arrays As Outputs
- Prev by Date: Re: Allocatable Arrays As Outputs
- Next by Date: Re: passing a variable number of args/vectors to a routine
- Previous by thread: Re: Allocatable Arrays As Outputs
- Next by thread: Re: Allocatable Arrays As Outputs
- Index(es):