Bytes occupied by one element of the record type tag, or -1 for an
unknown tag.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | tag |
pure function element_bytes(tag) result(nbytes) !! Bytes occupied by one element of the record type `tag`, or -1 for an !! unknown tag. integer(int32), intent(in) :: tag integer(int64) :: nbytes select case (tag) case (PIC_TAG_INT32) nbytes = 4_int64 case (PIC_TAG_INT64) nbytes = 8_int64 case (PIC_TAG_REAL_SP) nbytes = 4_int64 case (PIC_TAG_REAL_DP) nbytes = 8_int64 case (PIC_TAG_CHAR) nbytes = 1_int64 case default nbytes = -1_int64 end select end function element_bytes