MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FromDigits[{135,21}] -> 1371 (??!!)


FromDigits assumes that its argument is to be converted using base 10,
so FromDigits[{135, 21}] == 135 * 10^1 + 21 * 10^0 == 1371.  To
concatenate the numbers in a list, join them as strings and then
convert back:

In[1]:= ToExpression[StringJoin[ToString /@ {135, 21}]]
Out[1]= 13521

Michael

P.S. Google groups suppresses your full email address, so I couldn't
copy you there.


  • Prev by Date: Re: FromDigits[{135,21}] -> 1371 (??!!)
  • Next by Date: Re: Problems with ExtendGraphics/Delaunay Triangulation
  • Previous by thread: Re: Re: FromDigits[{135,21}] -> 1371 (??!!)
  • Next by thread: Re: FromDigits[{135,21}] -> 1371 (??!!)