File: example_bitsets_ge.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 (18 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
program example_ge
  use stdlib_bitsets
  implicit none
  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. &
      set0 >= set0 .and. set1 >= set1 .and. set2 >= set2 .and. &
      .not. set0 >= set1 .and. .not. set0 >= set2 .and. .not. &
      set1 >= set2) then
    write (*, *) 'Passed 64 bit greater than or equals tests.'
  else
    error stop 'Failed 64 bit greater than or equals tests.'
  end if
end program example_ge