ADJUSTR(3I) Last changed: 2-5-98
ADJUSTR - Adjusts a character string to the right
ADJUSTR ([STRING=]string)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The ADJUSTR intrinsic function adjusts a character string to the
right, removes trailing blanks, and inserts leading blanks. It
accepts the following argument:
string Must be of type character
ADJUSTR is an elemental function. The name of this intrinsic cannot
be passed as an argument.
The result is type character with the same length as string.
The value of the result is the same as string except that any trailing
blanks have been deleted and the same number of leading blanks have
been inserted.
In the following examples, a carat (^) indicates a blank.
Example 1:
VAR = ADJUSTR( 'WORD^^' )
PRINT *,"VAR='", VAR,"'"
This code segment returns the following output:
VAR='^^WORD'
Example 2:
CHARACTER*29 STRING
STRING = '^^^TEST STRING FOR ADJUSTR^^^'
WRITE(6,1) '>', STRING,'<'
WRITE(6,1) '>', ADJUSTR(STRING), '<'
1 FORMAT(3A)
END
This code returns the following output:
>^^^TEST STRING FOR ADJUSTR^^^<
>^^^^^^TEST STRING FOR ADJUSTR<
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
ADJUSTR(3I) Last changed: 2-5-98
ADJUSTR - Adjusts a character string to the right
ADJUSTR ([STRING=]string)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The ADJUSTR intrinsic function adjusts a character string to the
right, removes trailing blanks, and inserts leading blanks. It
accepts the following argument:
string Must be of type character
ADJUSTR is an elemental function. The name of this intrinsic cannot
be passed as an argument.
The result is type character with the same length as string.
The value of the result is the same as string except that any trailing
blanks have been deleted and the same number of leading blanks have
been inserted.
In the following examples, a carat (^) indicates a blank.
Example 1:
VAR = ADJUSTR( 'WORD^^' )
PRINT *,"VAR='", VAR,"'"
This code segment returns the following output:
VAR='^^WORD'
Example 2:
CHARACTER*29 STRING
STRING = '^^^TEST STRING FOR ADJUSTR^^^'
WRITE(6,1) '>', STRING,'<'
WRITE(6,1) '>', ADJUSTR(STRING), '<'
1 FORMAT(3A)
END
This code returns the following output:
>^^^TEST STRING FOR ADJUSTR^^^<
>^^^^^^TEST STRING FOR ADJUSTR<
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|