anchor.diff:  !###################################################################################
   !
   !*get_final_integer*
  -  subroutine get_final_integer(string,num)
  -    implicit none
  -    character,intent(in) :: string*(132)
  -    integer,intent(out) :: num
  -    integer :: ibeg,iend,nsign,ntemp
  +
  +  function get_final_integer(string)
  +    
  +    character,intent(in) :: string*(*)
  +    integer :: ibeg,iend,ierror,nsign,ntemp
       character :: sub_string*(40)
  -
  +    
  +    integer :: get_final_integer
  +    
  +    ! ###########################################################################
  +    
       iend=len(string) !get the length of the string
       ibeg=index(string,":")+1 !get location of integer in string, follows ":"
       sub_string = adjustl(string(ibeg:iend)) ! get the characters beyond ":"
  
positive.code: 
  contains
  !
  !###################################################################################
  !
  !*add_mesh:* Reads in an ipmesh file and adds this mesh to the terminal branches of an existing tree geometry
  
negative.code:        nsign=1
         ibeg=1
      endif
      
      read (sub_string(ibeg:iend), '(i10)', iostat=ierror ) ntemp !get integer values
      if(ierror.gt.0)then
         !... something wrong with data
         write(*,'(''Data read error'')')
         write(*,'(a)') sub_string(ibeg:iend)
      endif
      ntemp=ntemp*nsign !apply sign to number
      
      get_final_integer=ntemp !return the integer value
      
    end function get_final_integer
    
  !!!##################################################
  
    subroutine get_four_nodes(ne,string)
  