anchor.diff:  c
    20   continue
           ierr=1
  +        errstrng="read_diff"
           close(kr)
           return
   c
  
positive.code: c
  c...  open input file
  c
        ierr=0
        call fill(diforc,zero,ndof*numnp)
        call ifill(idhist,izero,numnp)
        if(numslp.eq.0.or.numdif.eq.0) return
        open(kr,file=difile,status="old",err=20)
  c
  c...  read differential force info and output results, if desired
  c
        call pskip(kr)
        nlines=0
        npage=50
        if(idout.gt.0) open(kw,file=ofile,status="old",access="append")
        do i=1,numdif
          read(kr,*,end=30,err=30) n,idhist(n),(diforc(j,n),j=1,ndof)
          slipry=.false.
          if(idout.gt.0) then
            nlines=nlines+1
            if(nlines.eq.1.or.mod(nlines,npage).eq.0) then
              write(kw,6000) (labeld(j),j=1,ndof)
              write(kw,*) ' '
            end if
            write(kw,7000) n,idhist(n),(diforc(j,n),j=1,ndof)
          end if
          do j=1,numslp
            if(n.eq.nslip(2,j)) slipry=.true.
          end do
          if(.not.slipry) then
            ierr=4
            return
          end if
        end do
        close(kr)
        if(idout.gt.0) close(kw)
  c
  c...  normal return
  c
  
negative.code: c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  c
  c
        subroutine read_diff(diforc,nslip,idhist,numslp,numdif,numnp,
       & kr,kw,idout,difile,ofile,ierr,errstrng)
  c
  c...  reads and prints differential forces applied to slippery nodes
  c
  c     Error codes:
  c         0:  No error
  c         1:  Error opening input file (if numdif.ne.zero)
  c         2:  Error opening output file (if numdif.ne.zero)
  c         3:  Read error
  c         4:  Read error
  c       109:  Differential force applied to non-slippery node
  c
        include "implicit.inc"
  c
  c...  parameter definitions
  c
        include "ndimens.inc"
        include "nconsts.inc"
        include "rconsts.inc"
  c
  c...  subroutine arguments
  c
        integer numslp,numdif,numnp,kr,kw,idout,ierr
        integer nslip(nsdim,numslp),idhist(numnp)
        double precision diforc(ndof,numnp)
        character difile*(*),ofile*(*),errstrng*(*)
  c
  c...  included dimension and type statements
  c
        include "labeld_dim.inc"
  c
  c...  intrinsic functions
  c
  