title: Error: Operands of logical operator '.eq.' at (1) are INTEGER(4)/HOLLERITH
body: <p>I am new in Fortran. So I need help. I'm using gfortran on SUSE to compile my code and receive the following error:</p>
  
  <pre><code>200 IF ( ID .EQ. 4HEOT ) GO TO 20
                 1
  
  Error: Operands of logical operator '.eq.' at (1) are INTEGER(4)/HOLLERITH
  </code></pre>
  
  <p>Main file for code is attached in the below link where at 1818 line shows the error.</p>
  
  <p>My file's link is: <a href="https://files.engineering.com/getfile.aspx?folder=cd6961f3-d38b-4e61-a43d-269fa18c7d11&amp;file=sfeng.f" rel="nofollow noreferrer">https://files.engineering.com/getfile.aspx?folder=cd6961f3-d38b-4e61-a43d-269fa18c7d11&amp;file=sfeng.f</a></p>
  
  <p>How to fix this one?</p>
  
  <p>For simplified/minimal example, I have added here the code:</p>
  
  <pre><code>      SUBROUTINE CDRD ( II )
  
        IMPLICIT DOUBLE PRECISION (A-H,O-Z)
  c     ohad 15/7/08
  c      IMPLICIT INTEGER*8 (I-N)
        IMPLICIT INTEGER*4 (I-N)
  
  C*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=C
  C     THIS SUBROUTINE READS PROPULSION SYSTEM DRAG DATA.               C
  C                                                                      C
  C     USE NON-ZERO "II" TO WRITE TABLE DATA.                           C
  C*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=C
  
        CHARACTER*80    TITLE, CDFILE
        DIMENSION       A(100),IREP(30),IDD(4)
  
        COMMON /UNITS / IU5, IU6, IU7, IU8, IU9, IU16, IU17, IU18
        COMMON /CYUNIT/ IU3, IU4, IU10, IU11, IU12, IU13, IU14, IU15
        COMMON /CYICOM/ IENG, IPRINT, NPRINT, NPDRY, NPAB, NITMAX,
       1                IVAT, LIMCD
        COMMON /CDSIZE/ CDNOZ(5000)
        COMMON /ICDTAB/ ICDDAT(10), NTBL
        COMMON /CDLOC/  LOCCD(5)
        COMMON /CDFIL / CDFILE, A10, A9REF, A10REF, XNOZ, XNREF, RCRV,
       1                NAB, NABREF
  C======================================================================C
        IU12  = 12
        IUNIT = IU12
        OPEN (UNIT=IUNIT, FILE=CDFILE, STATUS='OLD', ERR=9992)
        REWIND (IUNIT)
        NTBL = 0
        NMAX = 5000
        MR   = 0
        IF ( NTBL .EQ. 0 ) THEN
          LOC = 1
          DO 10 M = 1,NMAX
     10   CDNOZ(M) = 0.
        ENDIF
  
     20 READ (IU12, 5000, END=400, ERR=6666 ) IP, ITABNO, TITLE
  
     30 IF(ITABNO .EQ. 0) THEN
          NREM = NMAX-LOC
          IF ( II .GT. 0 ) THEN
            WRITE(IU6,5010) NTBL
            WRITE(IU6,5020) (N, ICDDAT(N), LOCCD(N), N = 1,NTBL)
            WRITE(IU6,5030) NMAX, NREM
          ENDIF
          IF( MR .GT. 0 ) WRITE(IU6,5040) (IREP(IQ), IQ = 1,MR)
          RETURN
        ELSE
          NTBL = NTBL+1
          ICDDAT(NTBL) = ITABNO
          LOCCD(NTBL)  = LOC
          IF ( NTBL .GT. 1 ) THEN
            DO 40 I = 2,NTBL
              IF ( ITABNO .EQ. ICDDAT(I-1) ) GO TO 50
     40     CONTINUE
            GO TO 150
     50     MLOC = LOCCD(I-1)
            ILOC = MLOC
            LOCCD(I-1) = LOC
            NTBL = NTBL - 1
            MR   = MR + 1
            IREP(MR) = ITABNO
            LIBLOC = 100000
            DO 60 IRK = 1,NTBL
              LIBRA = LOCCD(IRK)
              IF ( (LIBRA .GE. MLOC) .AND. (LIBRA .LT. LIBLOC) )
       *                                  LIBLOC = LIBRA
     60     CONTINUE
            LEO = LIBLOC - MLOC
            IF ( LEO .NE. 0 ) THEN
              IZAR = LOC - 1
              DO 70 I = LIBLOC,IZAR
                CDNOZ(MLOC) = CDNOZ(I)
                MLOC = MLOC + 1
     70       CONTINUE
              DO 80 I = 1,NTBL
                LLOC = LOCCD(I)
                IF ( LLOC .GT. ILOC ) LOCCD(I) = LLOC - LEO
     80       CONTINUE
            ENDIF
            DO 90 I = MLOC,LOC
     90     CDNOZ(I) = 0.
            LOC = MLOC
          ENDIF
        ENDIF
  
    150 IF ( II .GT. 0 ) THEN
          WRITE ( IU6, 5060 ) ITABNO, TITLE
          IP = 1
        ENDIF
  
        ICC = 0
        LZ  = LOC
        DO 180 ICL = 1,4
    180 IDD(ICL) = 4H    
    190 IDL = ID
        READ (IU12, 5070, END=200, ERR=6666 ) ID, N, (A(I), I = 1,N)
    200 IF ( ID .EQ. 4HEOT ) GO TO 20
        ICC = ICC + 1
        IF ( ICC .LE. 4 )      IDD(ICC) = ID
        IF ( ID  .EQ. IDL )    GO TO 280
        IF ( ID  .NE. IDD(4) ) GO TO 210
        IF ( IDL .EQ. IDD(2) ) GO TO 280
        LOC = LE
        L = LX
        GO TO 220
    210 CDNOZ(LOC) = N
        L  = LOC
        IF ( ID .EQ. IDD(3) ) LX = L
        IF ( ID .NE. IDD(2) ) GO TO 260
        LY = L
        LZ = LZ + 1
        GO TO 260
  
  C ... WRITE THE TABULAR DATA.
    220 IF ( IP .NE. 0 ) THEN
          LY = LY+1
          WRITE(IU6,5080) IDD(1), CDNOZ(LZ), IDD(2), CDNOZ(LY)
          JF = 0
          M  = N
          LF = LX
    240   NP = M
          IF ( M .GT. 8 ) NP = 8
          M  = M - NP
          LE = LF + NP
          LF = LF + 1
          WRITE(IU6,5090) IDD(3), (CDNOZ(I), I = LF,LE)
          LF = LE
          JE = JF + NP
          JF = JF + 1
          WRITE(IU6,5090) IDD(4), (A(I), I = JF,JE)
          JF = JE
          IF( M .GT. 0 ) GO TO 240
        ENDIF
  
    260 DO 270 I = 1,N
          LOC = LOC + 1
          CDNOZ(LOC) = A(I)
    270 CONTINUE
        LE = LOC
        IF ( ID .EQ. IDD(4) ) CDNOZ(LOC+2) = 1.
        LOC = L + 2*N + 6
        IF ( LOC .GT. NMAX ) GO TO 300
        GO TO 190
    280 CDNOZ(LOC) = CDNOZ(LX)
        L = LOC
        DO 290 I = 1,N
          LOC = LOC + 1
          CDNOZ(LOC) = CDNOZ(LX+I)
    290 CONTINUE
        GO TO 220
    300 WRITE(IU6,5100) ITABNO
        ITABNO = 0
        GO TO 30
  
    400 CONTINUE
        ITABNO = 0
        GO TO 30
  
   6666 CONTINUE
        WRITE(IU6,6669) IU12
        STOP
  
   5000 FORMAT (I1,I4,A)
   5010 FORMAT (//,33X,'TABLE DATA INPUT SUMMARY, ',I3,' TABLES',//,
       1    28X,'TABLE NUMBER  REFERENCE NUMBER   ARRAY LOCATION')
   5020 FORMAT (33X,I2,12X,I5,14X,I5)
   5030 FORMAT (/,36X,'DATA STORAGE ALLOCATION ',I7,/,
       1          36X,'DATA STORAGE NOT USED   ',I7,/)
   5040 FORMAT(10X,'THE FOLLOWING TABLES HAVE BEEN REPLACED',10(I5,','))
   5060 FORMAT (//,3X,I4,A,/)
   5070 FORMAT(A4,I3,3X,(T11,7F10.0))
   5080 FORMAT(1X,A4,' = ',E13.5,1X,A4,' = ',E13.5)
   5090 FORMAT(20X,A4,1X,8E13.5)
   5100 FORMAT (' ********* TABLE OVER FLOW, TABLE ',I5,' NOT LOADED')
   6669 FORMAT(/,' ERROR READING ENGINE TABULAR INPUT DATA FROM UNIT',
       *       I3,'.',/,' PROGRAM ABORTED IN SUBROUTINE TABRD.')
  
   9992 CONTINUE
        WRITE(IU6,9999) 'ERROR OPENING THE INPUT FILE ', CDFILE,
       *       ' AS UNIT ', IUNIT, '.',
       *              'PROGRAM ABORTED IN SUBROUTINE CDRD.'
   9999 FORMAT(//,1X,2A,/,A,I2,A,/,1X,A,/)
        STOP
        END
  </code></pre>