如果set1
和set2
中并非所有位的值都相同,则返回.true.
,否则返回.false.
。这两个集合必须具有相同数量的位,否则结果未定义。(规范)
program example_inequality
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 ( set0 /= set1 .and. set0 /= set2 .and. set1 /= set2 .and. &
.not. set0 /= set0 .and. .not. set1 /= set1 .and. .not. &
set2 /= set2 ) then
write(*,*) 'Passed 64 bit inequality tests.'
else
error stop 'Failed 64 bit inequality tests.'
end if
end program example_inequality
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
type(bitset_large), | intent(in) | :: | set1 | |||
type(bitset_large), | intent(in) | :: | set2 |