diff options
author | Robert Griesemer <gri@golang.org> | 2011-10-17 12:54:18 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2011-10-17 12:54:18 -0700 |
commit | c5a6b05ba4500be3d977592e756538290defdf14 (patch) | |
tree | 2907345d1a419b1aa7dd68390fa514ada12df642 | |
parent | 3e0c0a8add600cd395c4e30a4db8cc1ede90acc9 (diff) | |
download | go-c5a6b05ba4500be3d977592e756538290defdf14.tar.gz go-c5a6b05ba4500be3d977592e756538290defdf14.zip |
go spec: clarifying variable declaractions w/ constants
Fixes #2377.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5267048
-rw-r--r-- | doc/go_spec.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index 4c1ecef353..7a3161c3ee 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,5 +1,5 @@ <!-- title The Go Programming Language Specification --> -<!-- subtitle Version of October 13, 2011 --> +<!-- subtitle Version of October 17, 2011 --> <!-- TODO @@ -1784,15 +1784,17 @@ of the expression list. <p> If the type is absent and the corresponding expression evaluates to an untyped <a href="#Constants">constant</a>, the type of the declared variable -is <code>bool</code>, <code>int</code>, <code>float64</code>, or <code>string</code> -respectively, depending on whether the value is a boolean, integer, -floating-point, or string constant: +is <code>bool</code>, <code>int</code>, <code>float64</code>, +<code>complex128</code>, or <code>string</code> respectively, depending on +whether the value is a boolean, integer, floating-point, complex, or string +constant: </p> <pre> var b = true // t has type bool var i = 0 // i has type int var f = 3.0 // f has type float64 +var c = 1i // c has type complex128 var s = "OMDB" // s has type string </pre> |