tem_posOfLong Function

private pure function tem_posOfLong(long, array) result(pos)

This function detects the first position of an integer value of kind long_k in an array. When there is no match the return value is 0.

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: long
integer(kind=long_k), intent(in) :: array(:)

Return Value integer


Called by

proc~~tem_posoflong~~CalledByGraph proc~tem_posoflong tem_posOfLong proc~tem_unify_vrtx tem_unify_vrtx proc~tem_unify_vrtx->proc~tem_posoflong proc~tem_calc_vrtx_coord tem_calc_vrtx_coord proc~tem_calc_vrtx_coord->proc~tem_unify_vrtx proc~hvs_output_init hvs_output_init proc~hvs_output_init->proc~tem_calc_vrtx_coord proc~tem_init_tracker tem_init_tracker proc~tem_init_tracker->proc~hvs_output_init

Contents

Source Code


Source Code

  pure function tem_posOfLong( long, array ) result( pos )
    ! ---------------------------------------------------------------------------
    integer(kind=long_k), intent(in) :: long
    integer(kind=long_k), intent(in) :: array(:)
    integer :: pos
    ! ---------------------------------------------------------------------------
    integer :: iEntry
    ! ---------------------------------------------------------------------------

    do iEntry = 1, size(array)
      if( long == array(iEntry))then
        pos = iEntry
        return
      end if
    end do

    pos = 0

  end function tem_posOfLong