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