strf_I2P Function

private elemental function strf_I2P(fm, n) result(str)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: fm
integer(kind=I2P), intent(in) :: n

Return Value character


Called by

proc~~strf_i2p~7~~CalledByGraph proc~strf_i2p~7 strf_I2P interface~str~7 str interface~str~7->proc~strf_i2p~7 proc~bctoi_i8p~7 bctoi_I8P proc~bctoi_i8p~7->interface~str~7 proc~bctoi_i1p~7 bctoi_I1P proc~bctoi_i1p~7->interface~str~7 proc~bctoi_i2p~7 bctoi_I2P proc~bctoi_i2p~7->interface~str~7 proc~bctoi_i4p~7 bctoi_I4P proc~bctoi_i4p~7->interface~str~7 interface~bcton~7 bcton interface~bcton~7->proc~bctoi_i8p~7 interface~bcton~7->proc~bctoi_i1p~7 interface~bcton~7->proc~bctoi_i2p~7 interface~bcton~7->proc~bctoi_i4p~7

Contents

Source Code


Source Code

   elemental function strf_I2P(fm, n) result(str)
   !< Convert integer to string.
   !<
   !<```fortran
   !< use penf
   !< print "(A)", str(fm=FI2P, n=1_I2P)
   !<```
   !=> 1 <<<
   character(*), intent(in) :: fm  !< Format different from the standard for the kind.
   integer(I2P), intent(in) :: n   !< Integer to be converted.
   character(DI2P)          :: str !< Returned string containing input number.

   write(str, trim(fm)) n
   endfunction strf_I2P