]> Cypherpunks repositories - gostls13.git/commitdiff
redo poor example of slices.
authorRob Pike <r@golang.org>
Tue, 3 Mar 2009 04:17:12 +0000 (20:17 -0800)
committerRob Pike <r@golang.org>
Tue, 3 Mar 2009 04:17:12 +0000 (20:17 -0800)
R=rsc
OCL=25614
CL=25614

doc/go_spec.html

index dade367047d1661365fc4a6fae4b8bc3e089375b..2ec8094a9c38d6492517b1ca67019f9579f722ca 100644 (file)
@@ -1014,11 +1014,13 @@ make([]T, length, capacity)
 </pre>
 
 <p>
-produces the same slice as allocating an array and slicing it:
+produces the same slice as allocating an array and slicing it, so these two examples
+produce the same slice:
 </p>
 
 <pre>
-make([]T, capacity)[0 : length]
+make([]int, 50, 100)
+new([100]int)[0:50]
 </pre>