--- trunk/mdtools/md_code/generic_list_functions.i90 2003/01/28 22:16:55 252 +++ trunk/mdtools/md_code/generic_list_functions.i90 2003/01/31 21:04:27 260 @@ -46,18 +46,20 @@ subroutine find_atype(ident,this_list, atype) if (.not. associated(this_list)) return temp => this_list - + do while (associated(temp)) if (temp%atype_ident == ident) then atype => temp exit endif + temp => temp%next end do end subroutine find_atype subroutine create_identPtrList(ident,this_list,identPtrList,status) + use definitions integer, dimension(:) :: ident type(generic_atype), pointer :: this_list type(generic_atype), pointer :: tmpPtr @@ -72,6 +74,7 @@ subroutine create_identPtrList(ident,this_list,identPt status = 0 list_size = size(ident) + !! Allocate space for pointer list. if (.not. associated(identPtrList)) then allocate(identPtrList(list_size),stat=alloc_stat)