Lahey/Fujitsu Fortran

ADJUSTL Function

Description

The ADJUSTL function results in a character string which has been adjusted to the left. Leading blanks are removed from any text and replaced as trailing blanks. The resulting character string is the same length as the input string.

Syntax

ADJUSTL (string)

Arguments

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

Result

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

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

Example

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