Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4e681cd

Browse files
🎨 go-04
1 parent 1cc00e4 commit 4e681cd

File tree

1 file changed

+42
-20
lines changed

1 file changed

+42
-20
lines changed

‎go-04/1.md‎

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,47 @@
1010
意义:分享知识,提升自己
1111

1212
## 1.1 算术运算符
13-
- +
14-
- -
15-
- *
16-
- /
17-
- %
18-
- ++
19-
- --
13+
- (+)
14+
- (-)
15+
- (*)
16+
- (/)
17+
- (%)
18+
- (--)
19+
- (++)
2020
- Go语言没有前置的++,-- 错误示例:(++a)
2121

22-
## 1.2 类型转化
23-
- Go 语言不允许隐式类型转换
24-
- 别名和原有类型也不能进行隐式类型转换
25-
26-
## 1.3 类型的预定于值
27-
- math.MaxInt64
28-
- math.MaxFloat64
29-
- math.MaxUint32
30-
31-
## 1.4 指针类型
32-
与其他主要编程语言的差异
33-
- 不支持指针运算
34-
- string是值类型,其默认的初始化值为空字符串,而不是nil
22+
## 1.2 比较运算符
23+
- (==)
24+
- (!=)
25+
- (>)
26+
- (<)
27+
- (>=)
28+
- (<=)
29+
30+
## 1.2.1 用 == 比较数组
31+
- 相同维数且含有相同个数元素的数组才可以比较
32+
- 每个元素都相同的才相等
33+
34+
## 1.3 逻辑运算符
35+
- (&&)
36+
- (||)
37+
- (!)
38+
39+
## 1.4 位运算符
40+
- (&)
41+
- (|)
42+
- (^)
43+
- (<<)
44+
- (>>)
45+
46+
## 1.4.1 与其他主要编程语言的差异
47+
48+
&^按位置清零
49+
50+
1 &^ 0 -- 1
51+
1 &^ 1 -- 0
52+
1 &^ 1 -- 0
53+
0 &^ 0 -- 0
54+
55+
结论:右边是1,结果是0。右边是0,左边是什么就是什么。
56+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /