operator(>) Interface

public interface operator(>)

Returns .true. if the bits in set1 and set2 differ and the highest order different bit is set to 1 in set1 and to 0 in set2, .false. otherwise. The sets must have the same number of bits otherwise the result is undefined. (Specification)

Example

    program example_gt
        use stdlib_bitsets
        type(bitset_64) :: set0, set1, set2
        call set0 % init( 33 )
        call set1 % init( 33 )
        call set2 % init( 33 )
        call set1 % set( 0 )
        call set2 % set( 32 )
        if ( set1 > set0 .and. set2 > set1 .and. set2 > set0 .and. &
            .not. set0 > set0 .and. .not. set0 > set1 .and. .not.   &
            set1 > set2 ) then
            write(*,*) 'Passed 64 bit greater than tests.'
        else
            error stop 'Failed 64 bit greater than tests.'
        end if
    end program example_gt

Functions

private elemental module function gt_64(set1, set2) result(gt)

Arguments

Type IntentOptional Attributes Name
type(bitset_64), intent(in) :: set1
type(bitset_64), intent(in) :: set2

Return Value logical

private elemental module function gt_large(set1, set2) result(gt)

Arguments

Type IntentOptional Attributes Name
type(bitset_large), intent(in) :: set1
type(bitset_large), intent(in) :: set2

Return Value logical