Hi,
I'm trying to declare an array of binary trees within a data
structure and am running into compilation problems.
(SGI IRIX 6.5.17, MIPSpro 7.3.2.1m compiler).
Here's the structure that I would like to implement. Basically
it's an array (of varying size) of binary trees. I want to
declare several instances of this type(hits_type), that's why I've
wrapped it in a structure.
If I declare it as a pointer, the compiler doesn't recognize the
individual btree(i) component as a pointer. If I declare it as a
fixed-size array, the compiler thinks the "pointer" attribute is
referring to the btree array itself. How can I tell the compiler
that each individual data%btree(i) element is itself a pointer?
TYPE BTREE_TYPE
INTEGER*4 :: INDX
TYPE(BTREE_TYPE), POINTER :: LEFT
TYPE(BTREE_TYPE), POINTER :: RIGHT
END TYPE BTREE_TYPE
TYPE HITS_TYPE
INTEGER :: NCAMS
TYPE(BTREE_TYPE), DIMENSION(:), &
POINTER :: BTREE ! Can't nullify
! this component
TYPE(BTREE_TYPE), DIMENSION(9), &
POINTER :: BTREE ! Won't compile
END TYPE HITS_TYPE
TYPE(HITS_TYPE) :: data
nullify(data%btree(1))
Thanks for any help,
Catherine
--
-------------------------------------------------------------------------
Catherine Moroney phone : (818) 393-3392
Jet Propulsion Laboratory fax : (818) 393-4802
MailStop 169-315 email : [log in to unmask]
4800 Oak Grove Drive
Pasadena, CA 91109-8099
|