m_compare.f90 Source File

This File Depends On

sourcefile~~m_compare.f90~~EfferentGraph sourcefile~m_compare.f90 m_compare.f90 sourcefile~m_variablekind.f90 m_variableKind.f90 sourcefile~m_variablekind.f90->sourcefile~m_compare.f90
Help

Files Dependent On This One

sourcefile~~m_compare.f90~~AfferentGraph sourcefile~m_compare.f90 m_compare.f90 sourcefile~m_partition3way.f90 m_partition3way.f90 sourcefile~m_compare.f90->sourcefile~m_partition3way.f90
Help

Source Code


Source Code

module m_compare
  use variableKind

  implicit none

  interface compare
    module procedure :: compare_d1
  end interface

  contains

  function compare_d1(this,that) result(res)
    real(r64) :: this
    real(r64) :: that
    integer(i32) :: res

    if (this < that) then
      res = -1
    elseif (this > that) then
      res = 1
    else
      res = 0
    end if
  end function

end module