]> Cypherpunks repositories - gostls13.git/commitdiff
various spec tunings
authorRuss Cox <rsc@golang.org>
Thu, 9 Jul 2009 23:44:13 +0000 (16:44 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 9 Jul 2009 23:44:13 +0000 (16:44 -0700)
R=gri
DELTA=6  (0 added, 1 deleted, 5 changed)
OCL=31415
CL=31419

doc/go_spec.html

index ef39535d6f4746e5e23e0f5eb0c76eb521dfde82..d491db65f0577abbfddda43d03a07033c8ee0df5 100644 (file)
@@ -2436,8 +2436,8 @@ The operand types in binary operations must be compatible, with the following ex
          an ideal number, the ideal number is converted to match the type of
          the other operand (§Expressions).</li>
 
-       <li>If both operands are ideal numbers, the conversion is to ideal floats
-         if one of the operands is an ideal float
+       <li>Except in shift expressions, if both operands are ideal numbers and one is an
+         ideal float, the other is converted to ideal float
          (relevant for <code>/</code> and <code>%</code>).</li>
 
        <li>The right operand in a shift operation must be always be of unsigned integer type
@@ -2452,11 +2452,10 @@ The operand types in binary operations must be compatible, with the following ex
 </ul>
 
 <p>
-Unary operators have the highest precedence. They are evaluated from
-right to left. As the  <code>++</code> and <code>--</code> operators form
+Unary operators have the highest precedence.
+As the  <code>++</code> and <code>--</code> operators form
 statements, not expressions, they fall
-outside the unary operator hierarchy and apply
-to the operand on the left.
+outside the operator hierarchy.
 As a consequence, statement <code>*p++</code> is the same as <code>(*p)++</code>.
 <p>
 There are six precedence levels for binary operators.