Unit 2. Types

The text "Go" and the number 28487 are both represented with the same zeros and ones on an x86 computer (0110111101000111). The type establishes what those bits and bytes mean. One is a string of two characters, the other is a 16-bit integer (2 bytes). The string type is used for multilingual text, and 16-bit integers are one of many numeric types.

Unit 2 covers the primitive types that Go provides for text, characters, numbers, and other simple values. When appropriate, these lessons reveal the benefits and drawbacks to help you select the most appropriate type.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset