" INTEGER FUNCTION LASTCH (S,I1,I2)>C_TITL LASTCH Finds location of last non-separator in a stringC_ARGS, CHARACTER*(*) S ! [I] String to be searched/ INTEGER I1 ! [I] first location to be searched0 INTEGER I2 ! [I] last location to be searchedEC INTEGER LASTCH ! [F] location of last non-separator in search range C (separator is a blank or tab)-C Returns -1 if formal error (range invalid)'C Returns 0 if range is all separatorsC_KEYS CHARACTER UTILITY1C_DESC Searches backward for a non-(blank or tab)CC Uses temporary internal variable IRET for return value until end. C_CALLS 0AC_HIST 85jan24 Hugh_H_Kieffer U.S.G.S. Flagstaff ORIGINAL VERSION#C 85dec18 revise comments, add IRETC_END IRET = -11 IF (I1.LT.1 .OR. I2.LT.I1) GOTO 9 ! formal error IRET = 0 DO 5 I=I2,I1,-1 IF (S(I:I).EQ.' ') GOTO 52 IF (S(I:I).EQ.CHAR("011)) GOTO 5 ! Tab character IRET = I GOTO 9 5 CONTINUE99 LASTCH = IRET ! transfer return value to function name RETURN END