9.158 LEN — Length of a character entity
- Description:
- Returns the length of a character string. If STRING is an array, the length of an element of STRING is returned. Note that STRING need not be defined when this intrinsic is invoked, since only the length, not the content, of STRING is needed.
- Standard:
- Fortran 77 and later, with KIND argument Fortran 2003 and later
- Class:
- Inquiry function
- Syntax:
-
L = LEN(STRING [, KIND]) - Arguments:
-
STRING Shall be a scalar or array of type CHARACTER, withINTENT(IN)KIND (Optional) An INTEGERinitialization expression indicating the kind parameter of the result. - Return value:
- The return value is of type
INTEGERand of kind KIND. If KIND is absent, the return value is of default integer kind. - Specific names:
-
Name Argument Return type Standard LEN(STRING)CHARACTERINTEGERFortran 77 and later - See also:
- LEN_TRIM, ADJUSTL, ADJUSTR
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gfortran/LEN.html