tem_i2str Function

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

Converts an integer to a string according to the format provided in the logger.

Arguments

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

Return Value character(len=SolSpecLen)


Source Code

  function tem_i2str( val, logger ) result(str)
    ! ---------------------------------------------------------------------------
    !>
    integer(kind=int_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%int_form
    else
      form = primary%int_form
    end if
    write(str, '(' // trim(form) // ')') val

  end function tem_i2str