Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fm | Format different from the standard for the kind. |
||
real(kind=R4P), | intent(in) | :: | n | Real to be converted. |
Returned string containing input number.
Convert real to string.
elemental function strf_R4P(fm, n) result(str)
!---------------------------------------------------------------------------------------------------------------------------------
!< Convert real to string.
!---------------------------------------------------------------------------------------------------------------------------------
character(*), intent(in) :: fm !< Format different from the standard for the kind.
real(R4P), intent(in) :: n !< Real to be converted.
character(DR4P) :: str !< Returned string containing input number.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
write(str, trim(fm)) n
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction strf_R4P