convert a double precision real in a string (should be a variable length string, but that does not work with all the compilers)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | val |
the number to convert |
FUNCTION dbcsr_real_dp_to_string(val) RESULT(res) !! convert a double precision real in a string !! (should be a variable length string, but that does not work with !! all the compilers) REAL(KIND=dp), INTENT(in) :: val !! the number to convert CHARACTER(len=11) :: res WRITE (res, '(es11.4)') val END FUNCTION dbcsr_real_dp_to_string