Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ec9b0428
Commit
ec9b0428
authored
Jul 09, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various spec tunings
R=gri DELTA=6 (0 added, 1 deleted, 5 changed) OCL=31415 CL=31419
parent
38e7fddc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
go_spec.html
doc/go_spec.html
+5
-6
No files found.
doc/go_spec.html
View file @
ec9b0428
...
@@ -2436,8 +2436,8 @@ The operand types in binary operations must be compatible, with the following ex
...
@@ -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
an ideal number, the ideal number is converted to match the type of
the other operand (§Expressions).
</li>
the other operand (§Expressions).
</li>
<li>
If both operands are ideal numbers, the conversion is to ideal floats
<li>
Except in shift expressions, if both operands are ideal numbers and one is an
i
f one of the operands is an
ideal float
i
deal float, the other is converted to
ideal float
(relevant for
<code>
/
</code>
and
<code>
%
</code>
).
</li>
(relevant for
<code>
/
</code>
and
<code>
%
</code>
).
</li>
<li>
The right operand in a shift operation must be always be of unsigned integer type
<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
...
@@ -2452,11 +2452,10 @@ The operand types in binary operations must be compatible, with the following ex
</ul>
</ul>
<p>
<p>
Unary operators have the highest precedence.
They are evaluated from
Unary operators have the highest precedence.
right to left.
As the
<code>
++
</code>
and
<code>
--
</code>
operators form
As the
<code>
++
</code>
and
<code>
--
</code>
operators form
statements, not expressions, they fall
statements, not expressions, they fall
outside the unary operator hierarchy and apply
outside the operator hierarchy.
to the operand on the left.
As a consequence, statement
<code>
*p++
</code>
is the same as
<code>
(*p)++
</code>
.
As a consequence, statement
<code>
*p++
</code>
is the same as
<code>
(*p)++
</code>
.
<p>
<p>
There are six precedence levels for binary operators.
There are six precedence levels for binary operators.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment