<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of July 11, 2012",
+ "Subtitle": "Version of August 9, 2012",
"Path": "/ref/spec"
}-->
<h3 id="Order_of_evaluation">Order of evaluation</h3>
<p>
-When evaluating the elements of an assignment or expression,
-all function calls, method calls and
+When evaluating the <a href="#Operands">operands</a> of an expression,
+<a href="#Assignments">assignment</a>, or
+<a href="#Return_statements">return statement</a>,
+all function calls, method calls, and
communication operations are evaluated in lexical left-to-right
order.
</p>
of <code>y</code> is not specified.
</p>
+<pre>
+a := 1
+f := func() int { a = 2; return 3 }
+x := []int{a, f()} // x may be [1, 3] or [2, 3]: evaluation order between a and f() is not specified
+</pre>
+
<p>
Floating-point operations within a single expression are evaluated according to
the associativity of the operators. Explicit parentheses affect the evaluation