diff --git a/doc/go_spec.html b/doc/go_spec.html index d6ba3780721..614f8af8c73 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -374,7 +374,12 @@ the two bytes 0xc3 0xbf of the UTF-8 encoding of character U+00FF.

+

+A sequence of string literals is concatenated to form a single string. +

+
+StringLit              = string_lit { string_lit } .
 string_lit             = raw_string_lit | interpreted_string_lit .
 raw_string_lit         = "`" { unicode_char } "`" .
 interpreted_string_lit = """ { unicode_value | byte_value } """ .
@@ -383,13 +388,14 @@ interpreted_string_lit = """ { unicode_value | byte_value } """ .
 
 `abc`
 `\n`
-"hello, world\n"
 "\n"
 ""
 "Hello, world!\n"
 "日本語"
 "\u65e5本\U00008a9e"
 "\xff\u00FF"
+"Alea iacta est."
+"Alea " /* The die */ `iacta est` /* is cast */ "."  // same as "Alea iacta est."
 

@@ -505,16 +511,14 @@ as the two's complement of its absolute value.

-There is also a set of architecture-independent basic numeric types -whose size depends on the architecture: +There is also a set of numeric types with implementation-specific sizes:

-uint     at least 32 bits, at most the size of the largest uint type
-int      at least 32 bits, at most the size of the largest int type
-float    at least 32 bits, at most the size of the largest float type
-uintptr  smallest uint type large enough to store the uninterpreted
-		 bits of a pointer value
+uint     either 32 or 64 bits
+int      either 32 or 64 bits
+float    either 32 or 64 bits
+uintptr  an unsigned integer large enough to store the uninterpreted bits of a pointer value
 

@@ -546,21 +550,12 @@ The elements of strings have type byte and may be accessed using the usual indexing operations (§Indexes). It is illegal to take the address of such an element, that is, even if s[i] is the ith byte of a -string, &s[i] is invalid. The length of a string -can be computed by the function len(s1). +string, &s[i] is invalid. The length of string +s can be discovered using the built-in function +len(s). It is a compile-time constant if s +is a string literal.

-

-A sequence of string literals is concatenated into a single string. -

-
-StringLit   = string_lit { string_lit } .
-
- -
-"Alea iacta est."
-"Alea " /* The die */ `iacta est` /* is cast */ "."
-

Array types

@@ -627,15 +622,8 @@ the length of the slice and the length of the array beyond the slice; a slice of length up to that capacity can be created by `slicing' a new one from the original slice (§Slices). The capacity of a slice a can be discovered using the -built-in function -

- -
-cap(s)
-
- -

-and the relationship between len() and cap() is: +built-in function cap(a) and the relationship between +len() and cap() is:

@@ -1753,7 +1741,6 @@ Operands denote the elementary values in an expression.
 Operand    = Literal | QualifiedIdent | "(" Expression ")" .
 Literal    = BasicLit | CompositeLit | FunctionLit .
 BasicLit   = int_lit | float_lit | char_lit | StringLit .
-StringLit  = string_lit { string_lit } .
 
@@ -1836,6 +1823,7 @@ constant key value.

For struct literals the following rules apply: +

-

Given the declarations @@ -1873,7 +1860,9 @@ origin := Point{}; // zero value for Point line := Line{origin, Point{y: -4, z: 12.3}}; // zero value for line.q.x

-

For array and slice literals the following rules apply: +

+For array and slice literals the following rules apply: +

-

Taking the address of a composite literal (§Address operators)