TRIM(3I) Last changed: 2-5-98
TRIM - Returns the character argument with trailing blank characters
removed
TRIM ([STRING=]string)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The TRIM intrinsic function removes trailing blank characters from its
character argument. If the input string contains trailing blank
characters, it returns the string without the trailing blanks. If the
string contains only blanks, it returns a zero-length string. It
accepts the following argument:
string Must be of type character and be a scalar
TRIM is a transformational function. The name of this intrinsic
cannot be passed as an argument.
The result is a scalar entity of type character with a length that is
the length of string without any trailing blank characters. The value
of the result is the same as string except that any trailing blanks
have been removed. If string contains only blank characters, the
result is a string of 0 length.
Consider the following example of a TRIM function reference. In this
example, the carat (^) represents a blank:
CHVAR = TRIM( '^W^O^R^D^^' )
PRINT *,"CHVAR='",CHVAR,"'"
This reference returns the following result:
CHVAR='^W^O^R^D'
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
TRIM(3I) Last changed: 2-5-98
TRIM - Returns the character argument with trailing blank characters
removed
TRIM ([STRING=]string)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The TRIM intrinsic function removes trailing blank characters from its
character argument. If the input string contains trailing blank
characters, it returns the string without the trailing blanks. If the
string contains only blanks, it returns a zero-length string. It
accepts the following argument:
string Must be of type character and be a scalar
TRIM is a transformational function. The name of this intrinsic
cannot be passed as an argument.
The result is a scalar entity of type character with a length that is
the length of string without any trailing blank characters. The value
of the result is the same as string except that any trailing blanks
have been removed. If string contains only blank characters, the
result is a string of 0 length.
Consider the following example of a TRIM function reference. In this
example, the carat (^) represents a blank:
CHVAR = TRIM( '^W^O^R^D^^' )
PRINT *,"CHVAR='",CHVAR,"'"
This reference returns the following result:
CHVAR='^W^O^R^D'
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|