Lahey/Fujitsu Fortran

ADJUSTR Function

Description

The ADJUSTR function results in a character string which has been adjusted to the right. Trailing blanks are removed from any text string, and replaced as leading blanks. The resulting character string is the same length as the input string.

Syntax

ADJUSTR (string)

Arguments

string is an INTENT(IN) scalar or array of type CHARACTER.

Result

A CHARACTER of the same length, kind, and shape as string.

The result is the text from string with any trailing blanks removed and the same number of leading blanks inserted.

Example

character(len=10) :: str="string " write(*,*) "'",adjustr(str),"'" ! writes ' string'