tem_r2str Function

private function tem_r2str(val, logger) result(str)

Convert a real to a string according to the format provided in the logger.

Arguments

Type IntentOptional Attributes Name
real(kind=single_k), intent(in) :: val
type(tem_logging_type), intent(in), optional :: logger

Return Value character(len=SolSpecLen)


Source Code

  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