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

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.

主站蜘蛛池模板: 右玉县| 尼勒克县| 金川县| 商洛市| 莎车县| 璧山县| 进贤县| 徐州市| 霍林郭勒市| 华安县| 阿荣旗| 聂拉木县| 丰镇市| 乐至县| 方正县| 乌鲁木齐市| 昌邑市| 丹巴县| 旅游| 公安县| 楚雄市| 白城市| 湖北省| 白河县| 湘西| 德兴市| 花垣县| 板桥市| 溧水县| 靖江市| 卢湾区| 介休市| 定边县| 泾阳县| 高陵县| 青州市| 永新县| 微山县| 新乡县| 岳西县| 太白县|