bstr_R4P Function

private elemental function bstr_R4P(n) result(bstr)

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: n

Real to be converted.

Return Value character(len=32)

Returned bit-string containing input number.

Description

Convert real to string of bits.

Called By

proc~~bstr_r4p~~CalledByGraph proc~bstr_r4p bstr_R4P interface~bstr bstr interface~bstr->proc~bstr_r4p
Help

Source Code

  elemental function bstr_R4P(n) result(bstr)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Convert real to string of bits.
  !<
  !< @note It is assumed that R4P is represented by means of 32 bits, but this is not ensured in all architectures.
  !---------------------------------------------------------------------------------------------------------------------------------
  real(R4P), intent(in) :: n    !< Real to be converted.
  character(32)         :: bstr !< Returned bit-string containing input number.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  write(bstr, '(B32.32)') n
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction bstr_R4P