bctoi_I2P Function

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

Arguments

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

Return Value integer(kind=I2P)


Calls

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

Called by

proc~~bctoi_i2p~2~~CalledByGraph proc~bctoi_i2p~2 bctoi_I2P interface~bcton~2 bcton interface~bcton~2->proc~bctoi_i2p~2

Contents

Source Code


Source Code

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

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