       FUNCTION   TRUE_LENGTH(STRING)
C
C----------------------------------------------------------------------
C
C.IDENTIFICATION: Function   TRUE_LENGTH
C.LIBRARY:        GENERAL
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       1.0 - 28 May 91 - Original version
C.PURPOSE:        return the true length of a string
C.METHOD:         count last non-blank character in string
C.SYNTAX:         length = TRUE_LENGTH(string)
C.PARAMETERS:     CHARACTER*(*) string        a string (in)
C-                INTEGER return value        the true length (return)
C.RESTRICTIONS:   none 
C.NOTES:          none
C.FILES:          none
C.REFERENCES:     noen
C
C----------------------------------------------------------------------
C
C      INCLUDE 'implicit_none.inc'
       CHARACTER*(*) STRING
       INTEGER       TRUE_LENGTH
       INTEGER I
C
       DO 1 I=LEN(STRING),1,-1
       IF (STRING(I:I) .NE. ' ') THEN
          TRUE_LENGTH=I
          RETURN
       ENDIF
 1     CONTINUE
       TRUE_LENGTH=0
       RETURN
       END
