soa_field_code Function

public pure function soa_field_code(field_kind) result(code)

Short schema spelling of a field kind code, or "?" if unknown.

These are the tokens that appear after the colon in a schema string: i32, i64, r32, r64, bool.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: field_kind

One of the SOA_FIELD_* constants.

Return Value character(len=:), allocatable


Source Code

   pure function soa_field_code(field_kind) result(code)
      !! Short schema spelling of a field kind code, or `"?"` if unknown.
      !!
      !! These are the tokens that appear after the colon in a schema string:
      !! `i32`, `i64`, `r32`, `r64`, `bool`.
      integer(int32), intent(in) :: field_kind
         !! One of the `SOA_FIELD_*` constants.
      character(len=:), allocatable :: code

      select case (field_kind)
      case (SOA_FIELD_INT32)
         code = "i32"
      case (SOA_FIELD_INT64)
         code = "i64"
      case (SOA_FIELD_REAL_SP)
         code = "r32"
      case (SOA_FIELD_REAL_DP)
         code = "r64"
      case (SOA_FIELD_LOGICAL)
         code = "bool"
      case default
         code = "?"
      end select
   end function soa_field_code