bctoi_I8P Function

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

Arguments

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

Return Value integer(kind=I8P)


Calls

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

Called by

proc~~bctoi_i8p~7~~CalledByGraph proc~bctoi_i8p~7 bctoi_I8P interface~bcton~7 bcton interface~bcton~7->proc~bctoi_i8p~7

Contents

Source Code


Source Code

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

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