anchor.diff:      END IF
       NSPHERE = NSPHERE + 1
   END DO
  +
  +NSPHERE = NSPHERE - 1
   
   CLOSE(5)
   
  
positive.code: 
  ! Rewritten in Fortran 90 by David W. Wright November 2013
  
  ! TODO: For reasons currently beyond my comprehension this results in X having a
  ! start index of 0 and D of 1, this needs to be fixed as it is odd
  ! and makes the code difficult to understand
  DIMENSION X(5000,3),D(5000)
  
  WRITE(6,"(A/)") "APS: VERSION 2.50"
  WRITE(6,"(A/)") "CALCULATION OF Rg FOR UP TO 5000 SPHERE MODELS"
  
negative.code: 
  REWIND 5
  
  NSPHERE = 1
  
  DO
      READ(5,"(4F10.2)", IOSTAT=IERR) (X(NSPHERE,J),J=1,3), RADIUS
  