This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

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


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