运算符(>) 接口

公用接口运算符(>)

如果 `set1` 和 `set2` 中的位不同,并且最高位不同的位在 `set1` 中设置为 1,在 `set2` 中设置为 0,则返回 `.true.`,否则返回 `.false.`。这些集合必须具有相同数量的位,否则结果将是未定义的。(规范)

示例

    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

函数

私有元素模块函数 gt_64(set1, set2) 结果(gt)

参数

类型 意图可选 属性 名称
类型(bitset_64), 意图(in) :: set1
类型(bitset_64), 意图(in) :: set2

返回值 逻辑

私有元素模块函数 gt_large(set1, set2) 结果(gt)

参数

类型 意图可选 属性 名称
类型(bitset_large), 意图(in) :: set1
类型(bitset_large), 意图(in) :: set2

返回值 逻辑