Go Integers: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 12: | Line 12: | ||
<tt>int</tt> should be the default. | <tt>int</tt> should be the default. | ||
=<tt>byte</tt>= | |||
<tt>byte</tt> is unsigned int represented on a byte (<tt>uint8</tt>). | |||
=Integer Literals= | =Integer Literals= |
Revision as of 01:19, 23 March 2016
Internal
Overview
Integers are designated by the following pre-declared type identifiers:
- Unsigned integers: uint8 (or byte), uint16, uint32 (or rune), uint64.
- Signed integers: int8, int16, int32, int64.
- Machine-dependent integers: uint, int and uintptr.
int should be the default.
byte
byte is unsigned int represented on a byte (uint8).