Commit 9d7538b4 authored by Rob Pike's avatar Rob Pike

slight refinement of select: evaluation is top to bottom, as in switches.

DELTA=9  (2 added, 4 deleted, 3 changed)
OCL=34690
CL=34692
parent 5eb36240
...@@ -3609,9 +3609,10 @@ RecvExpr = [ Expression ( "=" | ":=" ) ] "<-" Expression . ...@@ -3609,9 +3609,10 @@ RecvExpr = [ Expression ( "=" | ":=" ) ] "<-" Expression .
<p> <p>
For all the send and receive expressions in the "select" For all the send and receive expressions in the "select"
statement, the channel expression is evaluated. Any expressions statement, the channel expressions are evaluated, along with
that appear on the right hand side of send expressions are also any expressions that appear on the right hand side of send expressions,
evaluated. If any of the resulting channels can proceed, one is in top-to-bottom order.
If any of the resulting operations can proceed, one is
chosen and the corresponding communication and statements are chosen and the corresponding communication and statements are
evaluated. Otherwise, if there is a default case, that executes; evaluated. Otherwise, if there is a default case, that executes;
if not, the statement blocks until one of the communications can if not, the statement blocks until one of the communications can
...@@ -3654,10 +3655,6 @@ for { // send random sequence of bits to c ...@@ -3654,10 +3655,6 @@ for { // send random sequence of bits to c
} }
</pre> </pre>
<font color=red>
TODO: Make semantics more precise.
</font>
<h3 id="Return_statements">Return statements</h3> <h3 id="Return_statements">Return statements</h3>
...@@ -4489,6 +4486,7 @@ The following minimal alignment properties are guaranteed: ...@@ -4489,6 +4486,7 @@ The following minimal alignment properties are guaranteed:
<ul> <ul>
<li><font color=red>Implementation does not honor the restriction on goto statements and targets (no intervening declarations).</font></li> <li><font color=red>Implementation does not honor the restriction on goto statements and targets (no intervening declarations).</font></li>
<li><font color=red>Gccgo does not implement the blank identifier.</font></li> <li><font color=red>Gccgo does not implement the blank identifier.</font></li>
<li><font color=red>Method expressions are not implemented.</font></li>
</ul> </ul>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment