
Sets the bits in set1 to the bitwise or of the original bits in set1
and set2. The sets must have the same number of bits otherwise
the result is undefined.
(Specification)
program example_or
use stdlib_bitsets
type(bitset_large) :: set0, set1
call set0 % init(166)
call set1 % init(166)
call or( set0, set1 ) ! none none
if ( none(set0) ) write(*,*) 'First test of OR worked.'
call set0 % not()
call or( set0, set1 ) ! all none
if ( all(set0) ) write(*,*) 'Second test of OR worked.'
call set0 % not()
call set1 % not()
call or( set0, set1 ) ! none all
if ( all(set0) ) write(*,*) 'Third test of OR worked.'
call set0 % not()
call or( set0, set1 ) ! all all
if ( all(set0) ) write(*,*) 'Fourth test of OR worked.'
end program example_or
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bitset_large), | intent(inout) | :: | set1 | |||
| type(bitset_large), | intent(in) | :: | set2 |