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
39f009cb
Commit
39f009cb
authored
Apr 29, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go spec: fix iota description
R=r, rsc CC=golang-dev
https://golang.org/cl/946046
parent
452dd382
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
doc/go_spec.html
doc/go_spec.html
+4
-5
No files found.
doc/go_spec.html
View file @
39f009cb
...
...
@@ -1648,12 +1648,11 @@ const (
<h3
id=
"Iota"
>
Iota
</h3>
<p>
Within a
constant declaration
, the predeclared identifier
Within a
<a
href=
"#Constant_declarations"
>
constant declaration
</a>
, the predeclared identifier
<code>
iota
</code>
represents successive untyped integer
<a
href=
"#Constants"
>
constants
</a>
. It is reset to 0 whenever the reserved word
<code>
const
</code>
appears in the source and increments with each
<a
href=
"#Semicolons"
>
semicolon
</a>
. It can be used to construct a
set of related constants:
appears in the source and increments after each
<a
href=
"#ConstSpec"
>
ConstSpec
</a>
.
It can be used to construct a set of related constants:
</p>
<pre>
...
...
@@ -1681,7 +1680,7 @@ const y = iota // y == 0 (iota has been reset)
<p>
Within an ExpressionList, the value of each
<code>
iota
</code>
is the same because
it is only incremented a
t a semicolon
:
it is only incremented a
fter each ConstSpec
:
</p>
<pre>
...
...
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