Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
ce9417ee
Commit
ce9417ee
authored
Mar 12, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix language regarding type of numeric literals
R=rsc DELTA=4 (0 added, 2 deleted, 2 changed) OCL=26208 CL=26212
parent
307ec219
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
doc/go_spec.html
doc/go_spec.html
+2
-4
No files found.
doc/go_spec.html
View file @
ce9417ee
...
@@ -2856,10 +2856,8 @@ In practice, constant expressions are those that can be evaluated at compile tim
...
@@ -2856,10 +2856,8 @@ In practice, constant expressions are those that can be evaluated at compile tim
<p>
<p>
The type of a constant expression is determined by the type of its
The type of a constant expression is determined by the type of its
elements. If it contains only numeric literals, its type is
<i>
ideal
elements. If it contains only numeric literals, its type is
<i>
ideal
integer
</i>
or
<i>
ideal float
</i>
(§Ideal number). Whether it is an
integer
</i>
or
<i>
ideal float
</i>
(§Ideal number). Whether a literal
integer or float depends on whether the value can be represented
is an integer or float depends on the syntax of the literals (123 vs. 123.0).
precisely as an integer (123 vs. 1.23).
(TODO: Not precisely true; 1. is an ideal float.)
The nature of the arithmetic
The nature of the arithmetic
operations within the expression depends, elementwise, on the values;
operations within the expression depends, elementwise, on the values;
for example, 3/2 is an integer division yielding 1, while 3./2. is
for example, 3/2 is an integer division yielding 1, while 3./2. is
...
...
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