Convert a real to a string according to the format provided in the logger.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=single_k), | intent(in) | :: | val | |||
type(tem_logging_type), | intent(in), | optional | :: | logger |
function tem_r2str( val, logger ) result(str) ! --------------------------------------------------------------------------- !> real(kind=single_k), intent(in) :: val !> type(tem_logging_type), optional, intent(in) :: logger !> character(len=SolSpecLen) :: str ! --------------------------------------------------------------------------- character(len=form_len) :: form ! --------------------------------------------------------------------------- if (present(logger)) then form = logger%real_form else form = primary%real_form end if write(str, '(' // trim(form) // ')') val end function tem_r2str