File: example_bitsets_clear.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (12 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
program example_clear
  use stdlib_bitsets
  implicit none
  type(bitset_large) :: set0
  call set0%init(166)
  call set0%not()
  if (set0%all()) write (*, *) 'SET0 is properly initialized.'
  call set0%clear(165)
  if (.not. set0%test(165)) write (*, *) 'Bit 165 is cleared.'
  call set0%clear(0, 164)
  if (set0%none()) write (*, *) 'All bits are cleared.'
end program example_clear