same_citation Function

public pure function same_citation(lhs, rhs) result(same)

Check if two citations are the same

Arguments

Type IntentOptional Attributes Name
type(citation_type), intent(in) :: lhs

The first citation

type(citation_type), intent(in) :: rhs

The second citation

Return Value logical

Whether the citations are the same


Source Code

pure function same_citation(lhs, rhs) result(same)
   !> The first citation
   type(citation_type), intent(in) :: lhs
   !> The second citation
   type(citation_type), intent(in) :: rhs
   !> Whether the citations are the same
   logical :: same

   if (is_citation_present(lhs) .and. is_citation_present(rhs)) then
      same = lhs%doi == rhs%doi
   else
      same = .false.
   end if
end function same_citation