]> Cypherpunks repositories - gostls13.git/commitdiff
spec: avoid slice of array literal
authorRuss Cox <rsc@golang.org>
Fri, 2 Dec 2011 17:30:20 +0000 (12:30 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 2 Dec 2011 17:30:20 +0000 (12:30 -0500)
R=gri
CC=golang-dev
https://golang.org/cl/5451078

doc/go_spec.html

index eabe795f6686525f70cdf6776ff526c8127ed7d1..6c250785ea1111300ffa046e42cb46de8a6d2240 100644 (file)
@@ -1,5 +1,5 @@
 <!-- title The Go Programming Language Specification -->
-<!-- subtitle Version of November 22, 2011 -->
+<!-- subtitle Version of December 2, 2011 -->
 
 <!--
 TODO
@@ -2106,11 +2106,12 @@ element index plus one. A slice literal has the form
 </pre>
 
 <p>
-and is a shortcut for a slice operation applied to an array literal:
+and is a shortcut for a slice operation applied to an array:
 </p>
 
 <pre>
-[n]T{x1, x2, … xn}[0 : n]
+tmp := [n]T{x1, x2, … xn}
+tmp[0 : n]
 </pre>
 
 <p>