Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ $ echo ${#a[100]}
$ arr=([5]=a [9]=b [23]=c)
$ echo ${!arr[@]}
5 9 23
$ echo ${!arr[@*]}
$ echo ${!arr[*]}
5 9 23
```
Expand Down
2 changes: 1 addition & 1 deletion docs/variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ $ echo $result
60
```

上面例子中,如果变量`result`不声明为整数,`val1*val2`会被当作字面量,不会进行整数运算。另外,`val1`和`val2`其实不需要声明为整数,因为只要`resule`声明为整数,它的赋值就会自动解释为整数运算。
上面例子中,如果变量`result`不声明为整数,`val1*val2`会被当作字面量,不会进行整数运算。另外,`val1`和`val2`其实不需要声明为整数,因为只要`result`声明为整数,它的赋值就会自动解释为整数运算。

注意,一个变量声明为整数以后,依然可以被改写为字符串。

Expand Down