C   07/06/96 606071919  MEMBER NAME  VLBN     (S4)          FORTG1
      SUBROUTINE VLBN(NX,LB,XL,XH,NB)
      COMMON/BCS/IW(1)
      REAL RW(1)
      EQUIVALENCE (IW(1),RW(1))
      NB=0
      XL=0.0
      XH=0.0
      CALL BLOC(J,'$BIN',NX,&100)
      NJ=MIN0(IW(J),4)+1
      GOTO (100,100,10,15,40),NJ
   10 NB=100
      GOTO 20
   15 NB=IW(J+3)
      IF(NB.GT.1000.OR.NB.LE.0) GOTO 10
   20 IF(LB.LE.0.OR.LB.GT.NB) GOTO 100
      DX=(RW(J+2)-RW(J+1))/FLOAT(NB)
      XH=RW(J+1)+FLOAT(LB)*DX
      XL=XH-DX
      GOTO 100
   40 NB=IW(J)-1
      IF(LB.LE.0) GOTO 100
      IF(LB.GT.NB) GOTO 100
      XL=RW(J+LB)
      XH=RW(J+LB+1)
  100 RETURN
      END
