The SELECTED_CHAR_KIND intrinsic function returns the kind number for the Character type that provides the named character set.
Standard character set names are 'DEFAULT' (for default Character), 'ASCII' (for ISO 646 characters) and 'ISO_10646' (for the 32-bit encoding of ISO/IEC 10646 characters).
The ISO/IEC 10646 character set is also known as Unicode.
The NAG Fortran Compiler additionally recognises 'JIS_0213' (for JIS X 0213 characters) and 'UCS_2' (for the 16-bit encoding of ISO/IEC 10646 characters); it also accepts 'JIS_0208' and 'SHIFT_JIS' as synonyms for 'JIS_0213', and 'UCS_4' as a synonym for 'ISO_10646'.
If the name is not recognised, or the character set is not supported, the value −1 is returned.
|