mirror of
https://github.com/golang/go
synced 2024-11-25 13:57:57 -07:00
fix wording of &T{x}
R=rsc DELTA=5 (0 added, 2 deleted, 3 changed) OCL=26607 CL=26607
This commit is contained in:
parent
2bd101c4b1
commit
2a5af744a6
@ -1910,11 +1910,9 @@ pi := Num{Rat{22, 7}, 3.14159, "pi"}
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Since evaluation of a literal creates a new value, taking the address of a
|
Taking the address of a composite literal (§Address operators)
|
||||||
composite literal (§Address operators) generates a pointer to a unique
|
generates a unique pointer to an instance of the literal's value.
|
||||||
instance of the literal's value.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
var pi_ptr *Rat = &Rat{22, 7}
|
var pi_ptr *Rat = &Rat{22, 7}
|
||||||
</pre>
|
</pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user