strf_R16P Function

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

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: fm
real(kind=R16P), intent(in) :: n

Return Value character


Contents

Source Code


Source Code

   elemental function strf_R16P(fm, n) result(str)
   !< Convert real to string.
   !<
   !<```fortran
   !< use penf
   !< print "(A)", str(fm=FR16P, n=1._R16P)
   !<```
   !=> 0.100000000000000000000000000000000E+0001 <<<
   character(*), intent(in) :: fm  !< Format different from the standard for the kind.
   real(R16P),   intent(in) :: n   !< Real to be converted.
   character(DR16P)         :: str !< Returned string containing input number.

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