mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-14 02:22:50 +00:00
good good study, day day up!
This commit is contained in:
3
ch3/ch3-01.md
Normal file
3
ch3/ch3-01.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 3.1. 整型
|
||||
|
||||
TODO
|
3
ch3/ch3-02.md
Normal file
3
ch3/ch3-02.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 3.2. 浮點數
|
||||
|
||||
TODO
|
3
ch3/ch3-03.md
Normal file
3
ch3/ch3-03.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 3.3. 復數
|
||||
|
||||
TODO
|
3
ch3/ch3-04.md
Normal file
3
ch3/ch3-04.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 3.4. 佈爾型
|
||||
|
||||
TODO
|
3
ch3/ch3-05.md
Normal file
3
ch3/ch3-05.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 3.5. 字符串
|
||||
|
||||
TODO
|
3
ch3/ch3-06.md
Normal file
3
ch3/ch3-06.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 3.6. 常量
|
||||
|
||||
TODO
|
5
ch3/ch3.md
Normal file
5
ch3/ch3.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# 第3章 基礎數據類型
|
||||
|
||||
雖然從底層而言,所有的數據都是比特,但計算機操作的是固定位數的數,如整數、浮點數、比特組、內存地址。將這些數,進一步組織在一起,可錶達更多的對象,如數據包、像素點、詩歌,甚至任何對象.Go提供了豐富的數據組織形式,這依賴於Go內置的數據類型。這些內置的數據類型,兼顧了硬件的特性和錶達復雜數據結構的便捷性。
|
||||
|
||||
Go將數據類型分為四類:基礎類型、復閤類型、引用類型和接口類型。本章介紹基礎類型,包括:數字,字符串和佈爾型。復閤數據類型——數組(§4.1)和結構體(§4.2)——通過組閤簡單類型,錶達更加復雜的數據結構。引用類型包括指鍼(§2.3.2)、切片(§4.2))字典(§4.3)、函數(§5)、通道(§8).雖然種類很多,但它們都是對程序中一個變量或狀態的間接引用。這意味着對任一引用的脩改都會影響所有該引用的拷貝。我們將在第7章介紹接口類型。
|
Reference in New Issue
Block a user