diff options
author | Russ Cox <rsc@golang.org> | 2011-12-02 12:30:20 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-12-02 12:30:20 -0500 |
commit | 4dfe976d974669e1234fbcd4f95341be41c1e575 (patch) | |
tree | ba339a5009c2afddf7ca1ef2f70c1397af8653f5 | |
parent | bd9dc3d55f65dce03be6d4ebbc7baaeb8e2a8964 (diff) | |
download | go-4dfe976d974669e1234fbcd4f95341be41c1e575.tar.gz go-4dfe976d974669e1234fbcd4f95341be41c1e575.zip |
spec: avoid slice of array literal
R=gri
CC=golang-dev
https://golang.org/cl/5451078
-rw-r--r-- | doc/go_spec.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index eabe795f66..6c250785ea 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -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> |