bstr_I4P Function

private elemental function bstr_I4P(n) result(bstr)

Arguments

TypeIntentOptionalAttributesName
integer(kind=I4P), intent(in) :: n

Return Value character(len=32)


Called by

proc~~bstr_i4p~4~~CalledByGraph proc~bstr_i4p~4 bstr_I4P interface~bstr~4 bstr interface~bstr~4->proc~bstr_i4p~4

Contents

Source Code


Source Code

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

   write(bstr, '(B32.32)') n
   endfunction bstr_I4P