function iTos (i) integer, intent(in) :: i character(iTos_len (i)) :: iTos character(16) :: string write (string,'(i16)') i iTos = adjustl (string) end function iTos