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
c1aba411
Commit
c1aba411
authored
Apr 28, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix description of iota to reflect reality.
SVN=117108
parent
f53db3ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
doc/go_lang.txt
doc/go_lang.txt
+6
-3
No files found.
doc/go_lang.txt
View file @
c1aba411
...
...
@@ -1246,9 +1246,11 @@ the others have.
The constant generator 'iota'
----
Within a declaration, each appearance of the keyword 'iota' represents a successive
element of an integer sequence. It is reset to zero whenever the keyword 'const', 'type'
or 'var' introduces a new declaration. For instance, 'iota' can be used to construct
Within a declaration, the keyword 'iota' represents successive
elements of an integer sequence.
It is reset to zero whenever the keyword 'const'
introduces a new declaration and increments as each identifier
is declared. For instance, 'iota' can be used to construct
a set of related constants:
const (
...
...
@@ -1266,6 +1268,7 @@ a set of related constants:
const x = iota; // sets x to 0
const y = iota; // sets y to 0
TODO: should iota work in var, type, func decls too?
Statements
----
...
...
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