bctor_R4P Function

private elemental function bctor_R4P(bstr, knd) result(n)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: bstr
real(kind=R4P), intent(in) :: knd

Return Value real(kind=R4P)


Called by

proc~~bctor_r4p~~CalledByGraph proc~bctor_r4p bctor_R4P interface~bcton bcton interface~bcton->proc~bctor_r4p program~volatile_doctest~258 volatile_doctest program~volatile_doctest~258->interface~bcton program~volatile_doctest~412 volatile_doctest program~volatile_doctest~412->interface~bcton program~volatile_doctest~612 volatile_doctest program~volatile_doctest~612->interface~bcton program~volatile_doctest~420 volatile_doctest program~volatile_doctest~420->interface~bcton program~volatile_doctest~436 volatile_doctest program~volatile_doctest~436->interface~bcton program~volatile_doctest~810 volatile_doctest program~volatile_doctest~810->interface~bcton program~volatile_doctest~818 volatile_doctest program~volatile_doctest~818->interface~bcton program~volatile_doctest~834 volatile_doctest program~volatile_doctest~834->interface~bcton program~volatile_doctest~982 volatile_doctest program~volatile_doctest~982->interface~bcton program~volatile_doctest~990 volatile_doctest program~volatile_doctest~990->interface~bcton program~volatile_doctest~407 volatile_doctest program~volatile_doctest~407->interface~bcton program~volatile_doctest~415 volatile_doctest program~volatile_doctest~415->interface~bcton program~volatile_doctest~813 volatile_doctest program~volatile_doctest~813->interface~bcton program~volatile_doctest~1217 volatile_doctest program~volatile_doctest~1217->interface~bcton program~volatile_doctest~1164 volatile_doctest program~volatile_doctest~1164->interface~bcton program~volatile_doctest~1188 volatile_doctest program~volatile_doctest~1188->interface~bcton program~volatile_doctest~1172 volatile_doctest program~volatile_doctest~1172->interface~bcton program~volatile_doctest~288 volatile_doctest program~volatile_doctest~288->interface~bcton program~volatile_doctest~642 volatile_doctest program~volatile_doctest~642->interface~bcton program~volatile_doctest~37 volatile_doctest program~volatile_doctest~37->interface~bcton program~volatile_doctest~235 volatile_doctest program~volatile_doctest~235->interface~bcton program~volatile_doctest~243 volatile_doctest program~volatile_doctest~243->interface~bcton program~volatile_doctest~259 volatile_doctest program~volatile_doctest~259->interface~bcton program~volatile_doctest~589 volatile_doctest program~volatile_doctest~589->interface~bcton program~volatile_doctest~597 volatile_doctest program~volatile_doctest~597->interface~bcton program~volatile_doctest~613 volatile_doctest program~volatile_doctest~613->interface~bcton program~volatile_doctest~1159 volatile_doctest program~volatile_doctest~1159->interface~bcton program~volatile_doctest~1167 volatile_doctest program~volatile_doctest~1167->interface~bcton program~volatile_doctest~230 volatile_doctest program~volatile_doctest~230->interface~bcton program~volatile_doctest~238 volatile_doctest program~volatile_doctest~238->interface~bcton program~volatile_doctest~584 volatile_doctest program~volatile_doctest~584->interface~bcton program~volatile_doctest~592 volatile_doctest program~volatile_doctest~592->interface~bcton program~volatile_doctest~1010 volatile_doctest program~volatile_doctest~1010->interface~bcton program~volatile_doctest~67 volatile_doctest program~volatile_doctest~67->interface~bcton program~volatile_doctest~435 volatile_doctest program~volatile_doctest~435->interface~bcton program~volatile_doctest~805 volatile_doctest program~volatile_doctest~805->interface~bcton program~volatile_doctest~833 volatile_doctest program~volatile_doctest~833->interface~bcton program~volatile_doctest~22 volatile_doctest program~volatile_doctest~22->interface~bcton program~volatile_doctest~14 volatile_doctest program~volatile_doctest~14->interface~bcton program~volatile_doctest~38 volatile_doctest program~volatile_doctest~38->interface~bcton program~volatile_doctest~1040 volatile_doctest program~volatile_doctest~1040->interface~bcton program~volatile_doctest~9 volatile_doctest program~volatile_doctest~9->interface~bcton program~volatile_doctest~17 volatile_doctest program~volatile_doctest~17->interface~bcton program~volatile_doctest~465 volatile_doctest program~volatile_doctest~465->interface~bcton program~volatile_doctest~863 volatile_doctest program~volatile_doctest~863->interface~bcton program~volatile_doctest~987 volatile_doctest program~volatile_doctest~987->interface~bcton program~volatile_doctest~995 volatile_doctest program~volatile_doctest~995->interface~bcton program~volatile_doctest~1011 volatile_doctest program~volatile_doctest~1011->interface~bcton program~volatile_doctest~1187 volatile_doctest program~volatile_doctest~1187->interface~bcton

Contents

Source Code


Source Code

   elemental function bctor_R4P(bstr, knd) result(n)
   !< Convert bit-string to real.
   !<
   !<```fortran
   !< use penf
   !< print FR4P, bcton('00000000000000001000000000111111', knd=1._R4P)
   !<```
   !=> 0.100000E+01 <<<
   character(*), intent(in) :: bstr      !< String containing input number.
   real(R4P),    intent(in) :: knd       !< Number kind.
   real(R4P)                :: n         !< Number returned.
   integer(I1P)             :: buffer(4) !< Transfer buffer.

   read(bstr, '(4B8.8)') buffer
   n = transfer(buffer, n)
   endfunction bctor_R4P