      PROGRAM READFILE
      IMPLICIT NONE
      INTEGER I
      CHARACTER*80 WORD
      CHARACTER*1 C
      LOGICAL GUESSED(26)
      
      OPEN (UNIT = 1, FILE = 'WORDS.TXT', STATUS = 'OLD')
      
      DO 200 I = 1, 1000
        READ (1, 100) WORD
100     FORMAT (A)
200   CONTINUE

      PRINT *, 'THE 1000TH WORD IN WORDS.TXT IS', WORD
      
      PRINT *, LEN(WORD)
      
      DO 30 I = 1, 10
        PRINT *, 'THE ', I, 'TH CHAR IS "', WORD(I:I), '"'
        PRINT *, 'ICHAR IS ', ICHAR(WORD(I:I))
30    CONTINUE        
        
      IF ('A' .EQ. 'a') THEN
        PRINT *, 'EQUAL'
      ENDIF  
      
      PRINT *, ICHAR('a') - ICHAR('A')  
      PRINT *, ICHAR('z') - ICHAR('Z')  
      
      READ *, C
      PRINT *, 'CHECKING ', C
      PRINT *, 'CHECKING ', CHAR(ICHAR(C) - (ICHAR('a') - ICHAR('A')))
      
      PRINT *, C, 'IS THE ', ICHAR(C) - ICHAR('a') + 1, 
     + 'TH CHAR IN THE ALPHABET'
      
      CLOSE (UNIT = 1)
      
      STOP
      END
           
      