Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Programming / Assignments /

AppendTo

FilledSmallSquare AppendTo[s, elem] appends elem to the value of s, and resets s to the result.

FilledSmallSquare AppendTo[s, elem] is equivalent to s = Append[s, elem].

FilledSmallSquare AppendTo[s, elem] does not evaluate s.

FilledSmallSquare You can use AppendTo repeatedly to build up a list, though Sow and Reap will usually be more efficient.

FilledSmallSquare AppendTo works on SparseArray objects, returning ordinary lists if necessary.

FilledSmallSquare See Section 2.5.4.

FilledSmallSquare See also: PrependTo, Sow.

FilledSmallSquare New in Version 1.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.