falseloc Function

public pure function falseloc(array, lbound) result(loc)

Return the positions of the false elements in array. Specification

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: array(:)

Mask of logicals

integer, intent(in), optional :: lbound

Lower bound of array to index

Return Value integer, (count(.not.array))

Locations of false elements


Source Code

  pure function falseloc(array, lbound) result(loc)
    !> Mask of logicals
    logical, intent(in) :: array(:)
    !> Lower bound of array to index
    integer, intent(in), optional :: lbound
    !> Locations of false elements
    integer :: loc(count(.not.array))

    call logicalloc(loc, array, .false., lbound)
  end function falseloc