Golang Grammar Summary (iv): Basic data types

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.
    • Integral types are: Int8/uint8, int16/uint16, Int32/uint32, Int64/uint64, Int/uint, Byte, rune
1) Digital representation of how many bits, uint u represents unsigned, a bit C language based on all know what meaning, here do not repeat;
2) Int/uint may be 32-bit or 64-bit depending on the operating platform;
3) Rune equivalent to int32 alias
4) byte equivalent to uint8 alias

    • Floating-point types are: float32, float64
              float64 is equivalent to a double of some other languages, that is, dual-precision floating-point
    • Strings: String

    • Boolean type: BOOL
    Only true or false, cannot be replaced by numbers (for example, C allows 0 to be false, not 0 for true)
    • Null value: Nil
    Some languages are null or null

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.