<?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="Assignment (computer science) - Page 25 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Assignment_(computer_science)&amp;p=24">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Assignment_%28computer_science%29&amp;p=26">3.Next</a>
</p>
<p>assignment statements are not expressions and thus do not have a value. Instead, chained assignments are a series of statements with multiple targets for a single expression. The assignments are executed left-to-right so that <code>i = arr[i] = f()</code> evaluates the expression <code>f()</code>, then assigns the result to the leftmost target, <code>i</code>, and then assigns the same result to the next target, <code>arr[i]</code>, using the new value of <code>i</code>. This is essentially equivalent to <code>tmp = f(); i = tmp; arr[i] = tmp</code></p><p>
<a accesskey="1" href="page.php?w=Assignment_(computer_science)&amp;p=24">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Assignment_%28computer_science%29&amp;p=26">3.Next</a>
</p>

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

</card>
</wml>
