mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:06:41 +08:00
Update 04.2.md (#548)
提高翻译的可读性,我在读这句话的时候反复读了三四遍没看懂,最后看原文才看懂。附原文: > Variables (like constants) contain data, and data can be of different data types, or types for short.
This commit is contained in:
@@ -236,7 +236,7 @@ godoc 工具(第 3.6 节)会收集这些注释并产生一个技术文档。
|
|||||||
|
|
||||||
## 4.2.4 类型
|
## 4.2.4 类型
|
||||||
|
|
||||||
可以包含数据的变量(或常量),可以使用不同的数据类型或类型来保存数据。使用 var 声明的变量的值会自动初始化为该类型的零值。类型定义了某个变量的值的集合与可对其进行操作的集合。
|
变量(或常量)包含数据,这些数据可以有不同的数据类型,简称类型。使用 var 声明的变量的值会自动初始化为该类型的零值。类型定义了某个变量的值的集合与可对其进行操作的集合。
|
||||||
|
|
||||||
类型可以是基本类型,如:int、float、bool、string;结构化的(复合的),如:struct、array、slice、map、channel;只描述类型的行为的,如:interface。
|
类型可以是基本类型,如:int、float、bool、string;结构化的(复合的),如:struct、array、slice、map、channel;只描述类型的行为的,如:interface。
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user