<!--{
"Title": "The Go Programming Language Specification",
- "Subtitle": "Version of Jun 28, 2021",
+ "Subtitle": "Version of Jul 1, 2021",
"Path": "/ref/spec"
}-->
<p>
The function <code>Slice</code> returns a slice whose underlying array starts at <code>ptr</code>
-and whose length and capacity are <code>len</code>:
+and whose length and capacity are <code>len</code>.
+<code>Slice(ptr, len)</code> is equivalent to
</p>
<pre>
</pre>
<p>
-As a special case, if <code>ptr</code> is <code>nil</code> and <code>len</code> is zero,
+except that, as a special case, if <code>ptr</code>
+is <code>nil</code> and <code>len</code> is zero,
<code>Slice</code> returns <code>nil</code>.
</p>
func Add(ptr Pointer, len IntegerType) Pointer
// The function Slice returns a slice whose underlying array starts at ptr
-// and whose length and capacity are len:
+// and whose length and capacity are len.
+// Slice(ptr, len) is equivalent to
//
// (*[len]ArbitraryType)(unsafe.Pointer(ptr))[:]
//
-// As a special case, if ptr is nil and len is zero, Slice returns nil.
+// except that, as a special case, if ptr is nil and len is zero,
+// Slice returns nil.
//
// The len argument must be of integer type or an untyped constant.
// A constant len argument must be non-negative and representable by a value of type int;