repo.or.cz
/
bash.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Patch-ID: bash32-029
[bash.git]
/
tests
/
arith1.sub
blob
43cae806cd648b649b8d70f8c0c1985f47f75ab1
1
# test of redone post-increment and post-decrement code
2
echo $(( 4-- ))
3
echo $(( 4++ ))
4
echo $(( 4 -- ))
5
echo $(( 4 ++ ))
6
7
(( array[0]++ ))
8
echo ${array}
9
10
(( array[0] ++ ))
11
echo ${array}
12
13
(( a++ ))
14
echo $a
15
(( a ++ ))
16
echo $a
17
18
echo $(( a ++ + 4 ))
19
echo $a
20
21
echo $(( a+++4 ))
22
echo $a
23
24
echo $(( a---4 ))
25
echo $a
26
27
echo $(( a -- + 4 ))
28
echo $a
29
30
echo $(( a -- - 4 ))
31
echo $a
32
33
(( ++ + 7 ))
34
35
(( ++ ))
36
echo $(( +++7 ))
37
echo $(( ++ + 7 ))
38
(( -- ))