00001 INTEGER FUNCTION lennob(string) 00002 IMPLICIT INTEGER (a-p,r-z),LOGICAL (q) 00003 C********************************************************************** 00004 C 00005 C INTEGER FUNCTION LENNOB( STRING ) 00006 C LENgth NOt counting trailing Blanks 00007 C 00008 C 00009 C Function 00010 C 00011 C 00012 C Returns the length of STRING up to and including the last 00013 C non-blank character. 00014 C 00015 C 00016 C Arguments 00017 C 00018 C 00019 C STRING --> String whose length not counting trailing blanks 00020 C is returned. 00021 C 00022 C********************************************************************** 00023 CHARACTER*(*) string 00024 00025 end = len(string) 00026 DO 20,i = end,1,-1 00027 IF (.NOT. (string(i:i).NE.' ')) GO TO 10 00028 lennob = i 00029 RETURN 00030 00031 10 CONTINUE 00032 20 CONTINUE 00033 lennob = 0 00034 RETURN 00035 00036 END