Next: SELECTED_INT_KIND, Previous: SECOND, Up: Intrinsic Procedures
SELECTED_CHAR_KIND — Choose character kindSELECTED_CHAR_KIND(NAME) returns the kind value for the character
set named NAME, if a character set with such a name is supported,
or -1 otherwise. Currently, supported character sets include
“ASCII” and “DEFAULT”, which are equivalent.
RESULT = SELECTED_CHAR_KIND(NAME)
| NAME | Shall be a scalar and of the default character type.
|
program ascii_kind
integer,parameter :: ascii = selected_char_kind("ascii")
character(kind=ascii, len=26) :: s
s = ascii_"abcdefghijklmnopqrstuvwxyz"
print *, s
end program ascii_kind