anchor.diff:  ! ================================================================================================ !
   subroutine dist_generateDist
   
  +  use crcoall
  +  use mod_common
     use mod_particles
   
  -  logical hasParticles
  -
  -  hasParticles = .false.
  -
  -  if(dist_numPart > 0) then
  +  if(dist_nParticle > 0) then
       call dist_parseParticles
  -    hasParticles = .true.
     end if
   
     if(dist_distFile /= " ") then
       call dist_readDist
  -    hasParticles = .true.
  -  end if
  -
  -  if(hasParticles) then
  +  end if
  +
  +  if(dist_numPart /= napx) then
  +    write(lerr,"(2(a,i0),a)") "DIST> ERROR Number of particles read or generated is ",dist_numPart,&
  +      " but the simulation setup requests ",napx," particles"
  +    call prror
  +  end if
  +
  +  if(dist_numPart > 0) then
       call dist_postprParticles
       call dist_finaliseDist
       call part_applyClosedOrbit
  
positive.code:   character(len=:), allocatable :: lnSplit(:)
    character(len=mInputLn) inLine
    integer i, j, nSplit, lineNo, fUnit
    logical spErr, cErr, isFirst
  
    write(lout,"(a)") "DIST> Reading particles from '"//trim(dist_distFile)//"'"
  
    dist_readCols = dist_nColumns
  
    isFirst = .true.
    lineNo  = 0
    cErr    = .false.
    j       = dist_numPart ! PARTICLE definitions in the block are saved first
  
    if(dist_hasFormat .eqv. .false.) then
      call dist_setColumnFormat("OLD_DIST",cErr)
  
negative.code:   if(spErr) goto 20
    if(nSplit == 0) goto 10
  
    if(nSplit /= dist_nColumns) then
      write(lerr,"(3(a,i0),a)") "DIST> ERROR Number of columns in file on line ",lineNo," is ",nSplit,&
        " but FORMAT defines ",dist_nColumns," columns"
      call prror
    end if
    do i=1,nSplit
      call dist_saveParticle(j, i, lnSplit(i), cErr)
    end do
    if(cErr) goto 20
    dist_numPart = dist_numPart + 1
  
    goto 10
  
  