C******************** START FILE IUFORD.FOR ; GROUP UFILS0 ******************
C--------------------------------------------------------------
C  IUFORD
C  INTEGER ORDERING FUNCTION ON 10 CHAR KEYWORDS
C  (ALPHABETIC)
C
      INTEGER FUNCTION IUFORD(ZKEY1,ZKEY2)
C
      CHARACTER*10 ZKEY1,ZKEY2
      CHARACTER*10 ZTES1,ZTES2
C
C  IN FIGURING ORDER, DO NOT INCLUDE TERMINATING ":"
C  RETURN IUFORD=0 IF ZKEY1=ZKEY2 ALPHABETICALLY
C    IUFORD=-1 IF ZKEY1<ZKEY2 ALPHABETICALLY
C    IUFORD=+1 IF ZKEY1>ZKEY2 ALPHABETICALLY
C
      IC=INDEX(ZKEY1,':')-1
      IF(IC.LE.0) IC=10
      ZTES1=ZKEY1(1:IC)
      IC=INDEX(ZKEY2,':')-1
      IF(IC.LE.0) IC=10
      ZTES2=ZKEY2(1:IC)
C  TEST
      IF(ZTES1.EQ.ZTES2) THEN
        IUFORD=0
      ELSEIF(ZTES1.GT.ZTES2) THEN
        IUFORD=1
      ELSE
        IUFORD=-1
      ENDIF
      RETURN
      END
C******************** END FILE IUFORD.FOR ; GROUP UFILS0 ******************
