bstr_I2P Function

private elemental function bstr_I2P(n) result(bstr)

Arguments

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

Return Value character(len=16)


Called by

proc~~bstr_i2p~7~~CalledByGraph proc~bstr_i2p~7 bstr_I2P interface~bstr~7 bstr interface~bstr~7->proc~bstr_i2p~7

Contents

Source Code


Source Code

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

   write(bstr, '(B16.16)') n
   endfunction bstr_I2P