Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_TypeKind_Flag), | intent(in) | :: | datakind | |||
character(len=*), | intent(out) | :: | string | |||
integer, | intent(out), | optional | :: | rc |
subroutine ESMF_TypeKindString(datakind, string, rc) ! ! !ARGUMENTS: type(ESMF_TypeKind_Flag), intent(in) :: datakind character(len=*), intent(out) :: string integer, intent(out), optional :: rc ! ! !DESCRIPTION: ! Return an {\tt ESMF\_TypeKind\_Flag} variable as a string. ! ! The arguments are: ! \begin{description} ! \item[datakind] ! The {\tt ESMF\_TypeKind\_Flag}. ! \item[string] ! The value as a string. ! \item[{[rc]}] ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors. ! \end{description} ! ! !EOPI #ifndef ESMF_NO_INTEGER_1_BYTE if (datakind == ESMF_TYPEKIND_I1) string = "Integer*1" #endif #ifndef ESMF_NO_INTEGER_2_BYTE if (datakind == ESMF_TYPEKIND_I2) string = "Integer*2" #endif if (datakind == ESMF_TYPEKIND_I4) string = "Integer*4" if (datakind == ESMF_TYPEKIND_I8) string = "Integer*8" if (datakind == ESMF_TYPEKIND_R4) string = "Real*4" if (datakind == ESMF_TYPEKIND_R8) string = "Real*8" if (datakind == ESMF_TYPEKIND_C8) string = "Complex*8" if (datakind == ESMF_TYPEKIND_C16) string = "Complex*16" if (present(rc)) rc = ESMF_SUCCESS end subroutine ESMF_TypeKindString