From: Robert Griesemer Date: Thu, 29 Apr 2010 17:57:27 +0000 (-0700) Subject: go spec: fix iota description X-Git-Tag: weekly.2010-05-04~46 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=39f009cb8eaf261d4ecbe706e55b9bf0c0efe6dd;p=gostls13.git go spec: fix iota description R=r, rsc CC=golang-dev https://golang.org/cl/946046 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index b4637e6e29..fe592ee97c 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1648,12 +1648,11 @@ const (

Iota

-Within a constant declaration, the predeclared identifier +Within a constant declaration, the predeclared identifier iota represents successive untyped integer constants. It is reset to 0 whenever the reserved word const -appears in the source and increments with each -semicolon. It can be used to construct a -set of related constants: +appears in the source and increments after each ConstSpec. +It can be used to construct a set of related constants:

@@ -1681,7 +1680,7 @@ const y = iota  // y == 0 (iota has been reset)
 
 

Within an ExpressionList, the value of each iota is the same because -it is only incremented at a semicolon: +it is only incremented after each ConstSpec: