Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
f5c07634
Commit
f5c07634
authored
May 01, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain about pointer types for mutually recursive structures.
SVN=117463
parent
5e391cff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
doc/go_lang.txt
doc/go_lang.txt
+9
-0
No files found.
doc/go_lang.txt
View file @
f5c07634
...
...
@@ -683,6 +683,15 @@ We do not allow pointer arithmetic of any kind.
*int
*map[string] *chan
It is legal to write a pointer type (only) such as *T or **T even if T
is not yet defined as a type name. This allows the construction of
mutually recursive data types such as structs:
type S1 struct { s2 *S2 } // S2 is not yet declared
type S2 struct { s1 *S1 }
By the end of the package source, such types must be fully declared.
There are no pointer literals.
...
...
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