      INTEGER FUNCTION M2IHM ( MIN, CTIME)
C
C     CONVER MINUTES TO MILITARY STYLE TIME (24 HOUR CLOCK TIME)
C
      CHARACTER CTIME*(*),CTMP*4
C
      ILEN = LEN (CTIME)
C
      IF ((MIN.LT.0).OR.(MIN.GT.1440)) GO TO 900
C
C     COMPUTE MILITARY STYLE TIME AS AN INTEGER
      IHR = MIN / 60
      JMIN = MIN - (IHR * 60)
      M2IHM = (IHR*100) + JMIN
C
      IF (ILEN.LT.4) RETURN
C
      WRITE ( CTMP(1:2), 10, ERR=900) IHR
      WRITE ( CTMP(3:4), 10, ERR=900) JMIN
 10   FORMAT (I2.2)
C
      CTIME = CTMP
      RETURN
C
 900  CONTINUE
      CALL CHRFIL (CTIME,'*')
      M2IHM = -1
      RETURN
      END
