Golang basic data type integral type

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Basic data type-integral type

Kinds

signed (minus sign)

    1. int8 int16 int32 int64
unsigned (unsigned)
    1. uint8 uint16 uint32 uint64
Schema-specific (depending on the number of system bits)
    1. int uint
type aliases
    1. Unicode字符rune类型等价int32
    2. byte等价uint8
Special Types
    1. uintptr,无符号整型,
    2. 由系统决定占用位大小,足够存放指针即可,和C库或者系统接口交互
  range of Values
Specific type Range of values
int8 128 to 127
Uint8 0 to 255
Int16 32768 to 32767
UInt16 0 to 65535
Int32 2147483648 to 2147483647
UInt32 0 to 4294967295
Int64 9223372036854775808 to 9223372036854775807
uint64 0 to 18446744073709551615

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.