to_string Interface

public interface to_string

将其他类型转化为字符串


Contents


Module Procedures

private pure function to_string_integer(i, fmt) result(s)

Format an integer to a string

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: i

integer to format

character, intent(in), optional :: fmt

format string

Return Value character,allocatable

resulting string

private pure function to_string_logical(l, fmt) result(s)

Format a logical to a string

Arguments

TypeIntentOptionalAttributesName
logical, intent(in) :: l

logical to format

character, intent(in), optional :: fmt

format string

Return Value character,allocatable

private pure function to_string_sp(r, fmt) result(s)

Format a single precision real to a string

Arguments

TypeIntentOptionalAttributesName
real(kind=sp), intent(in) :: r

real to format

character, intent(in), optional :: fmt

format string

Return Value character,allocatable

private pure function to_string_dp(r, fmt) result(s)

Format a double precision real to a string

Arguments

TypeIntentOptionalAttributesName
real(kind=dp), intent(in) :: r

real to format

character, intent(in), optional :: fmt

format string

Return Value character,allocatable