derived_catalog_requires Function

public function derived_catalog_requires(name) result(req)

The DERIVED_REQ_* code a catalog entry is gated on, -1 for an unknown name. The DECISION register_derived fails loud on, exposed as a lookup so the suite can assert it without provoking error stop — the repo’s standing pattern for testing a fail-loud rule.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Return Value integer


Calls

proc~~derived_catalog_requires~~CallsGraph proc~derived_catalog_requires derived_catalog_requires proc~ensure_catalog_initialised ensure_catalog_initialised proc~derived_catalog_requires->proc~ensure_catalog_initialised

Variables

Type Visibility Attributes Name Initial
integer, private :: i

Source Code

   function derived_catalog_requires(name) result(req)
      !! The `DERIVED_REQ_*` code a catalog entry is gated on, `-1` for
      !! an unknown name.  The DECISION `register_derived` fails loud on,
      !! exposed as a lookup so the suite can assert it without
      !! provoking `error stop` — the repo's standing pattern for
      !! testing a fail-loud rule.
      character(len=*), intent(in) :: name
      integer :: req
      integer :: i
      call ensure_catalog_initialised()
      req = -1
      do i = 1, N_CATALOG
         if (trim(CATALOG(i)%name) == trim(name)) then
            req = CATALOG(i)%requires
            return
         end if
      end do
   end function derived_catalog_requires