<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Snippet (programming) - Page 11 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Snippet_(programming)&amp;p=10">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Snippet_%28programming%29&amp;p=12">3.Next</a>
</p>
<p>For  and , the inserted code is: temp = foo foo = bar bar = temp</p>

<p>If the snippet is subsequently changed, say to use <code>__temp</code> instead of <code>temp</code>, the existing code would not automatically use the new snippet definition, but subsequent insertions would.</p>

<p><big>Alternatives</big></p>
<p>A common alternative to snippet use is the <a href="page.php?w=function_%28computer_programming%29">function</a> which has the advantage that modifying its definition affects consumers whereas modifying a snippet does not modify existing</p><p>
<a accesskey="1" href="page.php?w=Snippet_(programming)&amp;p=10">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Snippet_%28programming%29&amp;p=12">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
