function IndexR (String) ! !----------------------------------------------------------------------- ! ! >>> IndexR -- returns the index of the last non-blank CHARACTER, or a ! >>> IF the entire string is blank ! ! *** Calling Sequence: IPos = IndexR ( String ) ! !----------------------------------------------------------------------- ! ! INTEGER :: IndexR CHARACTER (len=*) :: String ! ! * * * * * ! loop index INTEGER :: i ! !----------------------- execution begins here ------------------------- ! DO 1 i = len (String), 1, - 1 IF (String (i:i) .ne.' ') THEN IndexR = i RETURN ENDIF 1 END DO ! IndexR = 0 ! RETURN END function IndexR