INTEGER FUNCTION LEN1(S) C----------------------------------------------------------------------- C Find the length of a character string excluding trailing blanks. C A blank string returns a value of 0. C----------------------------------------------------------------------- CHARACTER*(*) S C IF (S.EQ.' ') THEN LEN1 = 0 RETURN END IF DO I=LEN(S),1,-1 K = I IF (S(I:I).NE.' ') GOTO 10 END DO K = 0 10 LEN1 = K RETURN END