C   07/06/96 606071907  MEMBER NAME  READFF   (S4)          FORTG1
      SUBROUTINE READFF(LABEL,NF,FR,NM,*)
C     BOS SUBPROGRAM =2.2=
      LOGICAL*1 TC(80),BLL/' '/
      COMMON/TEXTIF/ITC(10),NBT
      EQUIVALENCE (TC(1),ITC(1))
      REAL*4 FR(NM)
      LOGICAL*1 LC(80),LH(4),LL(4)
      LOGICAL*4 END/.FALSE./
      INTEGER*4 LABEL,BLANK/'    '/,ALABEL,NH/0/
      REAL *8 ITC,TCI(10)
      EQUIVALENCE (LC(1),TCI(1))
      INTEGER NS(4)/75,96,78,125/,NV/0/,NP/0/,NE/0/,NZ/0/,IB/0/
      REAL*8 ZZ/0.0/,TEN/10.0/
      EQUIVALENCE (NH,LH(1)),(ALABEL,LL(1))
      EQUIVALENCE (IZL,FZL),(IZH,FZH)
      INTEGER LON/'PON '/,LOFF/'POFF'/,UNIT/'UNIT'/
      INTEGER IUN/5/,IPR/1/
      INTEGER KC/2/
C
 1111 CONTINUE
      NC=0
      NF=0
      IF(END) GOTO 200
      IF(IB.EQ.1) GOTO 10
    1 READ(IUN,101,END=5) TCI
      GOTO 10
    5 IF(IUN.NE.5) GOTO 6
      END=.TRUE.
      IF(NC.EQ.0) GOTO 200
      GOTO 100
    6 IUN=5
      IF(NC.EQ.0) GOTO 1
      IB=0
      GOTO 100
   10 NC=NC+1
      NFF=NF
      ALABEL=BLANK
      LAB=0
      NP=0
      NV=0
      NI=256
      DO 85 I=1,73
      NO=I
      IF(I.EQ.73) GOTO 50
      LH(4)=LC(I)
      IF(NH.LT.240.OR.NH.GT.249) GOTO 20
      LAB=4
      ZZ=ZZ*TEN+DFLOAT(NH-240)
      NZ=NZ+1
      NE=NE+NP
      GOTO 85
   20 DO 30 J=1,4
      IF(NH.EQ.NS(J)) GOTO 40
   30 CONTINUE
      J=0
      JV=0
      IF(LAB.GE.4.OR.NH.EQ.64) GOTO 50
      LAB=LAB+1
      LL(LAB)=LC(I)
      GOTO 85
   40 JV=0
      LAB=4
      GOTO (42,44,50,50),J
   42 NP=1
      GOTO 85
   44 JV=-1
   50 IF(NZ.EQ.0) GOTO 80
   60 IF(NP.EQ.0) GOTO 61
      FZL=ZZ/TEN**NE
      NZL=0
      IF(NV.LT.0) FZL=-FZL
      GOTO 62
   61 IZL=ZZ+DBLE(0.5)
      NZL=1
      IF(NV.LT.0) IZL=-IZL
      IF(NI.NE.197.OR.LZL.EQ.1) GOTO 62
      FZH=0.0
      IF(NF.LE.NM) FZH=FR(NF)
      IF(LZL.EQ.1) FZH=IZH
      IF(NF.LE.NM) FR(NF)=FZH*TEN**IZL
      NI=256
      GOTO 70
   62 IF(NI.NE.92.OR.LZL.EQ.0) GOTO 65
      IZH=1
      IF(NF.LE.NM) FZH=FR(NF)
      NF=NF-1
      DO 64 N=1,IZH
      NF=NF+1
      IF(NF.LE.NM) FR(NF)=FZL
   64 CONTINUE
      NI=256
      GOTO 70
   65 NF=NF+1
      IF(NF.LE.NM) FR(NF)=FZL
      LZL=NZL
      NI=0
   70 ZZ=0.0
      NE=0
      NZ=0
      NV=0
   80 NP=0
      IF(NH.EQ.125) GOTO 86
      IF(NH.EQ.64) GOTO 85
      NV=JV
      IF(J.NE.0) GOTO 85
      NI=256*NI+NH
   85 CONTINUE
   86 CONTINUE
      IF(KC.EQ.2) GOTO 92
   90 LABEL=ALABEL
      IF(LABEL.EQ.LON) IPR=1
      IF(IPR.EQ.1.OR.LABEL.EQ.UNIT) WRITE(6,102) TCI
      IB=0
      DO 91 I=1,10
   91 ITC(I)=TCI(I)
      IF(LABEL.EQ.LON) GOTO 1111
      IF(LABEL.EQ.LOFF) GOTO 93
      IF(LABEL.EQ.UNIT) GOTO 95
      GOTO 100
   93 IPR=0
      GOTO 1111
   95 IUN=IZL
      GOTO 1111
   92 IF(NC.NE.1) GOTO 94
      LH(4)=LL(4)
      IF(NH.EQ.216) GOTO 90
      IF(ALABEL.EQ.LON) GOTO 90
      IF(ALABEL.EQ.LOFF) GOTO 90
      IF(ALABEL.EQ.UNIT) GOTO 90
      IF(NO.LE.72) GOTO 90
      LABEL=ALABEL
      GOTO 96
   94 IF(ALABEL.NE.BLANK) GOTO 98
   96 IF(IPR.EQ.1.AND.NC.EQ.1) WRITE(6,102) TCI
      IF(IPR.EQ.1.AND.NC.NE.1) WRITE(6,105) TCI
      DO 97 I=1,10
   97 ITC(I)=TCI(I)
      IF(NO.GE.73) GOTO 1
      IB=0
      GOTO 100
   98 NF=NFF
      IB=1
  100 N1=NF+1
      N2=MIN0(NM,10)
      IF(N1.GT.N2) GOTO 104
      DO 103 I=N1,N2
  103 FR(I)=0.0
  104 NF=MIN0(NF,NM)
      NBT=0
      NO=NO+1
      IF(NO.GT.72) GOTO 108
      KI=1
      DO 106 I=NO,72
      TC(KI)=TC(I)
  106 KI=KI+1
      DO 107 I=KI,80
  107 TC(I)=BLL
      NBT=KI-1
  108 ALABEL=LABEL
      LH(4)=LL(1)
      IF(NH.NE.92) RETURN
      FZL=FR(2)
      IF(IB.NE.0.OR.NF.NE.2) GOTO 109
      READ(IUN,ITC) (FR(I+1),I=1,IZL)
      IF(IPR.EQ.1) WRITE(6,ITC) (FR(I+1),I=1,IZL)
      NF=1+IZL
      RETURN
  109 WRITE(6,110)
      CALL BDMPA(34)
  200 RETURN 1
  101 FORMAT(10A8)
  102 FORMAT(' -------- ',10A8)
  105 FORMAT(10X,10A8)
  110 FORMAT(' -------- WRONG *CARD  -  STOP')
      END
