bctoi_I4P Function

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

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: bstr
integer(kind=I4P), intent(in) :: knd

Return Value integer(kind=I4P)


Calls

proc~~bctoi_i4p~6~~CallsGraph proc~bctoi_i4p~6 bctoi_I4P interface~str~6 str proc~bctoi_i4p~6->interface~str~6 proc~strf_i1p~6 strf_I1P interface~str~6->proc~strf_i1p~6 proc~str_i1p~6 str_I1P interface~str~6->proc~str_i1p~6 proc~str_a_i1p~6 str_a_I1P interface~str~6->proc~str_a_i1p~6 proc~str_a_r8p~6 str_a_R8P interface~str~6->proc~str_a_r8p~6 proc~strf_r8p~6 strf_R8P interface~str~6->proc~strf_r8p~6 proc~strf_i4p~6 strf_I4P interface~str~6->proc~strf_i4p~6 proc~str_i4p~6 str_I4P interface~str~6->proc~str_i4p~6 proc~str_a_i4p~6 str_a_I4P interface~str~6->proc~str_a_i4p~6 proc~str_bol~6 str_bol interface~str~6->proc~str_bol~6 proc~str_r4p~6 str_R4P interface~str~6->proc~str_r4p~6 proc~strf_r4p~6 strf_R4P interface~str~6->proc~strf_r4p~6 proc~str_a_r4p~6 str_a_R4P interface~str~6->proc~str_a_r4p~6 proc~strf_i2p~6 strf_I2P interface~str~6->proc~strf_i2p~6 proc~str_i2p~6 str_I2P interface~str~6->proc~str_i2p~6 proc~str_a_i2p~6 str_a_I2P interface~str~6->proc~str_a_i2p~6 proc~str_r8p~6 str_R8P interface~str~6->proc~str_r8p~6 proc~strf_i8p~6 strf_I8P interface~str~6->proc~strf_i8p~6 proc~str_i8p~6 str_I8P interface~str~6->proc~str_i8p~6 proc~str_a_i8p~6 str_a_I8P interface~str~6->proc~str_a_i8p~6 proc~str_a_i1p~6->proc~str_i1p~6 proc~str_a_r8p~6->proc~str_r8p~6 proc~str_a_i4p~6->proc~str_i4p~6 proc~compact_real_string~6 compact_real_string proc~str_r4p~6->proc~compact_real_string~6 proc~str_a_r4p~6->proc~str_r4p~6 proc~str_a_i2p~6->proc~str_i2p~6 proc~str_r8p~6->proc~compact_real_string~6 proc~str_a_i8p~6->proc~str_i8p~6

Called by

proc~~bctoi_i4p~6~~CalledByGraph proc~bctoi_i4p~6 bctoi_I4P interface~bcton~6 bcton interface~bcton~6->proc~bctoi_i4p~6

Contents

Source Code


Source Code

   elemental function bctoi_I4P(bstr, knd) result(n)
   !< Convert bit-string to integer.
   !<
   !<```fortran
   !< use penf
   !< print FI4P, bcton('00000000000000000000000000000001', knd=1_I4P)
   !<```
   !=> 1 <<<
   character(*), intent(in) :: bstr !< String containing input number.
   integer(I4P), intent(in) :: knd  !< Number kind.
   integer(I4P)             :: n    !< Number returned.

   read(bstr,'(B'//trim(str(bit_size(knd), .true.))//'.'//trim(str(bit_size(knd), .true.))//')') n
   endfunction bctoi_I4P