selected_char_kind(name) returns the kind value for the character set named name, if a character set with such a name is supported, or otherwise. Currently, supported character sets include “ASCII” and “DEFAULT”, which are equivalent.
Fortran 2003 and later
Transformational function
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