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
b6b8da82
Commit
b6b8da82
authored
May 08, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up the 'basic types' section. strings were missing
SVN=118198
parent
f4f58837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
doc/go_lang.txt
doc/go_lang.txt
+19
-10
No files found.
doc/go_lang.txt
View file @
b6b8da82
...
...
@@ -285,11 +285,11 @@ There are basic types and compound types constructed from them.
Basic types
----
Go defines a number of basic types, referred to by their
predeclared type names. There are signed and unsigned integer
and floating point types:
Go defines a number of basic types, referred to by their
predeclared
type names. These include traditional arithmetic types, booleans,
strings, and a special polymorphic type.
bool the truth values true and false
The arithmetic types are:
uint8 the set of all unsigned 8-bit integers
uint16 the set of all unsigned 16-bit integers
...
...
@@ -319,18 +319,27 @@ bits, and the sizes have float <= double.
Also, ``byte'' is an alias for uint8.
Finally, a type ptrint is defined. It is an unsigned integer type
that is the smallest natural integer type of the machine large enough
to store the uninterpreted bits of a pointer value.
An arithmetic type ``ptrint'' is also defined. It is an unsigned
integer type that is the smallest natural integer type of the machine
large enough
to store the uninterpreted bits of a pointer value.
Generally, programmers should use these types rather than the explicitly
sized types to maximize portability.
Two reserved words, "true" and "false", represent the
Other basic types include:
bool the truth values true and false
string immutable strings of bytes
any polymorphic type
Two reserved words, ``true'' and ``false'', represent the
corresponding boolean constant values.
There is also a polymorphic type, "any". The "any" type can represent
a value of any type.
Strings are described in a later section.
The polymorphic ``any'' type can represent a value of any type.
TODO: we need a section about any
Numeric 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