Verify that a field record read back holds the expected element count.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Field name, for the message. |
||
| integer(kind=default_int), | intent(in) | :: | actual |
Elements found in the record. |
||
| integer(kind=default_int), | intent(in) | :: | expected |
Elements the prologue said the container has. |
||
| type(error_t), | intent(inout) | :: | err |
Error state, |
subroutine soa_check_field_count(name, actual, expected, err) !! Verify that a field record read back holds the expected element count. character(len=*), intent(in) :: name !! Field name, for the message. integer(default_int), intent(in) :: actual !! Elements found in the record. integer(default_int), intent(in) :: expected !! Elements the prologue said the container has. type(error_t), intent(inout) :: err !! Error state, `ERROR_VALIDATION` on a mismatch. if (actual /= expected) then call err%set(ERROR_VALIDATION, "soa field '"//name//"' holds "//to_char(int(actual, int64))// & " elements, expected "//to_char(int(expected, int64))) end if end subroutine soa_check_field_count