At 10:05 pm +0000 4/2/99, Feyzi Inanc wrote:
>In a problem I am working on, I want to use a structure which can be
>represented as
>
>TYPE TEST
> INTEGER::NUM
> TYPE(TEST), POINTER, DIMENSION(2,2,2)::NEXT
>END TYPE TEST
>
If I understand correctly what you want to do, you can get around this by
first declaring a new type for your pointer (shown in Metcalf & Reid,
F90/95 explained, page 135) in order for you to declare the array of
pointers.
type ptr
type(test), pointer :: point
end type ptr
type test
integer :: num
type(ptr), pointer :: next(2,2,2)
end type test
To reference this you need something like: node%next(i,j,k)%point%num
Hope that helps,
Glenn
----
Dr. Glenn Carver, Senior Research Associate,
Centre for Atmospheric Science, Chemistry Dept., Cambridge University, UK
[log in to unmask] http://www.atm.ch.cam.ac.uk/~glenn/
"Genius is one percent inspiration and ninety nine
percent perspiration" Thomas Edison.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|