File: example_bitsets_to_string.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 (15 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
program example_to_string
  use stdlib_bitsets
  implicit none
  character(*), parameter :: &
    bits_all = '111111111111111111111111111111111'
  type(bitset_64) :: set0
  character(:), allocatable :: new_string
  call set0%init(33)
  call set0%not()
  call set0%to_string(new_string)
  if (new_string == bits_all) then
    write (*, *) "TO_STRING transferred BITS0 properly"// &
      " into NEW_STRING."
  end if
end program example_to_string