File: example_bitsets_value.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-- 383 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
program example_value
  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 (set0%value(165) == 0) write (*, *) 'Bit 165 is cleared.'
  call set0%set(165)
  if (set0%value(165) == 1) write (*, *) 'Bit 165 is set.'
end program example_value