F90 derived type component as array



Sorry,

is there in F90 some restriction(s) for using of components (which are
really arrays) of derived types
instead of arrays itself ?

I.e. if I have for example something like

TYPE twoarray
real, dimension (:,:) ::A
real, dimension (:,:) ::B
END TYPE twoarray

TYPE(twoarray), DIMENSION(100) ::struct

- may I use struct(k)%B in any place where I may use simple
2-dimensional array ?

BTW, do I understand correctly that (in reality) memory requirements
for twoarray structure are
simple size(A)+size(B), i.e. "mapping" to the memory of this type is
simple "memory for A" and
then "memory for B" w/o any "control" information ?

Mikhail Kuzminsky
Zelinsky Institute of Organic Chemistry
Moscow

.



Relevant Pages

  • memory leak in (?)... (redux)
    ... the mem leaks in our long-running tcl daemons. ... when actively exercised the app grows continuously. ... the mystery is that while our audit code does show us a couple of arrays ... and memory are checked and meanwhile externally, ...
    (comp.lang.tcl)
  • Re: StackOverflowException.
    ... The Status object monitors the ... so I'm really at a total loss as to where I'm leaking stack memory. ... private static extern bool EscapeCommFunction(IntPtr hFile, ... Good to know about arrays. ...
    (microsoft.public.dotnet.framework)
  • Re: Strategy for caches & GC
    ... I end up writing manual allocators for byte arrays. ... memory to insure it sits in the LOH and suballocate from there (ala ... ArraySlicehandle to work with buffers. ... and manual management for memory and GC generation 0 for efficient ...
    (microsoft.public.dotnet.framework.clr)
  • Re: perl eating up memory slowly until program stops - any ideas ?
    ... Arrays are created, variables are set, ... For lexical scoping, a single chunk of memory, reserved by ... Private blocks, you have discussed this a number of times ...
    (comp.lang.perl.misc)
  • Re: F90 derived type component as array
    ... | really arrays) of derived types ... all Bmembers of all structs, ... do I understand correctly that memory requirements ...
    (comp.lang.fortran)