-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest1.go
More file actions
60 lines (52 loc) · 901 Bytes
/
test1.go
File metadata and controls
60 lines (52 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package main
import (
"fmt"
)
func main() {
// const norm1 = 2
// const norm3 = 4
// const norm2 string = "asd";
// var area int
// area = norm1 * norm3
// fmt.Printf("面积是 : %d", area)
// const(
// read = 1
// face = 2
// less = 3
// )
// const (
// a = 1
// b = 2
// c = 3
// )
// fmt.Println(a,b,c)
const(
ali = iota
tencent = iota
other = "我的"
baidu = iota
)
fmt.Println(ali, tencent, other, baidu)
// const (
// a = iota //0
// b //1
// c //2
// d = "ha" //独立值,iota += 1
// e //"ha" iota += 1
// f = 100 //iota +=1
// g //100 iota +=1
// h = iota //7,恢复计数
// i //8
// )
// fmt.Println(a,b,c,d,e,f,g,h,i)
const(
q = 2
w
t
y
)
fmt.Println(q)
fmt.Println(q)
fmt.Println(t)
fmt.Println(y)
}