!Description:
!  2 分木ソートの結果の標準出力
!
! Current Code Owner: sugiyama@gfd-dennou.org
!
! History: 
!   Version    Date          Comment
!   -------    ----------    -------
!   1.0        2003-01-31    新規作成
!
! Copyright (C) SUGIYAMA Ko-ichiro, 2003, All rights reserved

module interface_binsort_print
  interface

     recursive subroutine binsort_print(ptr)
       use prm_type, only: type_tree
       type(type_tree), pointer       :: ptr
     end subroutine binsort_print

  end interface
end module interface_binsort_print



recursive subroutine binsort_print(ptr)
  use prm_type, only: type_tree

  implicit none
  type(type_tree), pointer     :: ptr

  
  if (associated(ptr)) then 
     call binsort_print(ptr%left)
     write(*,*) ptr%node
     call binsort_print(ptr%right)
  end if
  
end subroutine binsort_print

