官术网_书友最值得收藏!

Values 

A value is what a program deals with. If you wrote a calculator program, then the values of the program are numbers. If you wrote a text search program, then the values are strings.

The programs we deal with nowadays as programmers are much more complicated than calculators. We deal with different types of values, ranging from number types (int, float64, and so on) to text (string).

A variable holds a value:

var a int = 1

The preceding line indicates that a is a variable that holds an int with the value 1. We've seen previous examples with the "Hello World" string.

主站蜘蛛池模板: 呼和浩特市| 分宜县| 渝中区| 漳平市| 临汾市| 磐安县| 台安县| 水富县| 武义县| 芦溪县| 定日县| 海兴县| 南通市| 来凤县| 拉孜县| 米林县| 桐梓县| 金坛市| 宁国市| 新余市| 泰来县| 华安县| 绩溪县| 疏勒县| 融水| 河北省| 额敏县| 胶南市| 天祝| 称多县| 炉霍县| 宜章县| 北宁市| 枞阳县| 贺兰县| 依兰县| 叶城县| 调兵山市| 双牌县| 大荔县| 康保县|