Intel® Fortran Compiler 16.0 User and Reference Guide

CHARACTER

Statement: Specifies the CHARACTER data type.

CHARACTER

CHARACTER([KIND=] n)

CHARACTER*len

n

Is kind 1.

len

Is a string length (not a kind). For more information, see Declaration Statements for Character Types.

If no kind type parameter is specified, the kind of the constant is default character.

Example

C
C   Length of wt and vs is 10, city is 80, and ch is 1
C
    CHARACTER wt*10, city*80, ch
    CHARACTER (LEN = 10), PRIVATE :: vs
    CHARACTER*(*) arg !declares a dummy argument
C   name and plume are ten-element character arrays
C   of length 20
    CHARACTER name(10)*20
    CHARACTER(len=20), dimension(10):: plume
C
C   Length of susan, patty, and dotty are 2, alice is 12,
C   jane is a 79-member array of length 2
C
    CHARACTER(2) susan, patty, alice*12, dotty, jane(79)

See Also