Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
da34bea9
Commit
da34bea9
authored
Mar 03, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redo poor example of slices.
R=rsc OCL=25614 CL=25614
parent
da38974c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
go_spec.html
doc/go_spec.html
+4
-2
No files found.
doc/go_spec.html
View file @
da34bea9
...
...
@@ -1014,11 +1014,13 @@ make([]T, length, capacity)
</pre>
<p>
produces the same slice as allocating an array and slicing it:
produces the same slice as allocating an array and slicing it, so these two examples
produce the same slice:
</p>
<pre>
make([]T, capacity)[0 : length]
make([]int, 50, 100)
new([100]int)[0:50]
</pre>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment