Next: , Previous: SECOND, Up: Intrinsic Procedures


8.189 SELECTED_CHAR_KIND — Choose character kind

Description:
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 -1 otherwise. Currently, supported character sets include “ASCII” and “DEFAULT”, which are equivalent.
Standard:
Fortran 2003 and later
Class:
Transformational function
Syntax:
RESULT = SELECTED_CHAR_KIND(NAME)
Arguments:

NAME Shall be a scalar and of the default character type.

Example:
          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