bstr_I8P Function

private elemental function bstr_I8P(n) result(bstr)

Convert integer to string of bits.

@note Note It is assumed that I8P is represented by means of 64 bits, but this is not ensured in all architectures.

 use penf
 print "(A)", bstr(n=1_I8P)

Arguments

Type IntentOptional Attributes Name
integer(kind=I8P), intent(in) :: n

Real to be converted.

Return Value character(len=64)

Returned bit-string containing input number.


Called by

proc~~bstr_i8p~~CalledByGraph proc~bstr_i8p bstr_I8P interface~bstr bstr interface~bstr->proc~bstr_i8p program~volatile_doctest~115 volatile_doctest program~volatile_doctest~115->interface~bstr program~volatile_doctest~146 volatile_doctest program~volatile_doctest~146->interface~bstr program~volatile_doctest~181 volatile_doctest program~volatile_doctest~181->interface~bstr program~volatile_doctest~25 volatile_doctest program~volatile_doctest~25->interface~bstr program~volatile_doctest~52 volatile_doctest program~volatile_doctest~52->interface~bstr program~volatile_doctest~65 volatile_doctest program~volatile_doctest~65->interface~bstr program~volatile_doctest~78 volatile_doctest program~volatile_doctest~78->interface~bstr

Source Code

   elemental function bstr_I8P(n) result(bstr)
   !< Convert integer to string of bits.
   !<
   !< @note It is assumed that I8P is represented by means of 64 bits, but this is not ensured in all architectures.
   !<
   !<```fortran
   !< use penf
   !< print "(A)", bstr(n=1_I8P)
   !<```
   !=> 0000000000000000000000000000000000000000000000000000000000000001 <<<
   integer(I8P), intent(in) :: n    !< Real to be converted.
   character(64)            :: bstr !< Returned bit-string containing input number.

   write(bstr, '(B64.64)') n
   endfunction bstr_I8P