From: Robert Griesemer Date: Wed, 12 Dec 2012 19:06:26 +0000 (-0800) Subject: spec: index and array/slice size constants must fit into an int X-Git-Tag: go1.1rc2~1652 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3906706297a78df69d7f87748963bf375b4c4511;p=gostls13.git spec: index and array/slice size constants must fit into an int R=r, rsc, iant, ken CC=golang-dev https://golang.org/cl/6903048 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 6e88d47f31..468fb3ad28 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -815,12 +815,13 @@ ElementType = Type .

-The length is part of the array's type and must be a -constant expression that evaluates to a non-negative -integer value. The length of array a can be discovered +The length is part of the array's type; it must evaluate to a non- +negative constant representable by a value +of type int. +The length of array a can be discovered using the built-in function len. The elements can be addressed by integer indices -indices 0 through len(a)-1. +0 through len(a)-1. Array types are always one-dimensional but may be composed to form multi-dimensional types.

@@ -2497,13 +2498,21 @@ The value x is called the rules apply:

+

+If a is not a map: +

+ +

For a of type A or *A where A is an array type: