File: example_bitsets_xor.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (19 lines) | stat: -rw-r--r-- 608 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
program example_xor
  use stdlib_bitsets
  implicit none
  type(bitset_large) :: set0, set1
  call set0%init(166)
  call set1%init(166)
  call xor(set0, set1) ! none none
  if (set0%none()) write (*, *) 'First test of XOR worked.'
  call set0%not()
  call xor(set0, set1) ! all none
  if (set0%all()) write (*, *) 'Second test of XOR worked.'
  call set0%not()
  call set1%not()
  call xor(set0, set1) ! none all
  if (set0%all()) write (*, *) 'Third test of XOR worked.'
  call set0%not()
  call xor(set0, set1) ! all all
  if (set0%none()) write (*, *) 'Fourth test of XOR worked.'
end program example_xor