ZhangZhihui's Blog  

> a=0
> b=1
> a=a+b
> echo $a
a+b

> a=0
> b=1
> a+=b
> echo \$a
0b

>a=0
>b=1
>(a+=b)

>echo \$a

0
>((a+=b))
>echo \$a
1

>a='0'
>b='1'
>(a+=b)
>echo \$a
0
>((a+=b))
>echo \$a
1

>a=0
>b='1'
>(a+=b)
>echo \$a
0
>((a+=b))
>echo \$a
1

>a='0'
>b=1
>(a+=b)
>echo \$a
0
>((a+=b))
>echo \$a
1

 

For usage of double parentheses, see https://www.cnblogs.com/zhangzhihui/articles/18054500 .

posted on 2019-10-14 16:19  ZhangZhihuiAAA  阅读(99)  评论(0编辑  收藏  举报