anchor.diff:  subroutine populate(pos, dim)
         implicit none
         integer                :: dim
  -      real*8                 :: pos(:, :)
  +      real*8, dimension(:,:) :: pos
         integer                :: seed, i, x
   
         !!call init_random_seed()
  
positive.code: end subroutine
  
  !! Finds the minima and maxima
  subroutine minmax(value, min, max)
        implicit none
        real*8, intent(in)   :: value(:)
  
negative.code: !!----------------------------------------------------------------------------!!
  
        integer, parameter :: dim = 6
        integer :: min, max, i
        real*8, dimension(2, dim)  :: pos
        real*8, dimension(dim)     :: value
        real*8  :: x, y, alpha, beta, gamma
  
        interface
            subroutine findval(pos, value, dim)
                real*8, dimension(:,:) :: pos
                real*8, dimension(:)   :: value
                integer                :: dim
            end subroutine findval
        end interface
  
        interface
            subroutine populate(pos, dim)
                real*8, dimension(:,:) :: pos
                integer                :: dim
            end subroutine populate
        end interface
  
        interface
            subroutine minmax(value, min, max)
                real*8, intent(in)   :: value(:)
                integer, intent(out) :: min, max
            end subroutine minmax
        end interface
  
        interface
            subroutine centroid(pos, min, max, dim)
                real*8, intent(inout)  :: pos(:,:)
                integer, intent(in)    :: min, max, dim
            end subroutine centroid
        end interface
  
        call populate(pos, dim)
  
        call findval(pos, value, dim)
  
        call minmax(value, min, max)
        do i = 1,dim
            write(*,*) value(i), pos(1, i), pos(2,i)
        end do
        write(*,*) max, min
  
        call centroid(pos, min, max, dim)
        write(*,*) pos(1, 4), pos(2, 4)
  
  end program
  
  