True when code falls inside the range PIC reserves for its own
error codes (0 .. PIC_ERROR_CODE_MAX). Downstream libraries can
assert their own codes are outside it:
if (is_pic_error_code(MYLIB_ERROR_SOCKET)) error stop “code clash”
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=default_int), | intent(in) | :: | code |
pure function is_pic_error_code(code) result(reserved) !! True when `code` falls inside the range PIC reserves for its own !! error codes (0 .. PIC_ERROR_CODE_MAX). Downstream libraries can !! assert their own codes are outside it: !! if (is_pic_error_code(MYLIB_ERROR_SOCKET)) error stop "code clash" integer(default_int), intent(in) :: code logical :: reserved reserved = (code >= 0) .and. (code <= PIC_ERROR_CODE_MAX) end function is_pic_error_code