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
Added gitignore entries needed to ignore derived objects generated from full build...
[bash.git]
/
tests
/
func4.sub
blob
9c9c1b42fe735a2eb86823e47793c442ecdb6059
1
# test FUNCNEST functionality -- bash-4.2
2
FUNCNEST=100
3
4
foo()
5
{
6
(( f++ ))
7
if (( f > 200 )); then
8
return 7
9
fi
10
foo
11
}
12
13
f=0
14
foo
15
echo $?
16
echo after: f = $f
17
18
f=0
19
foo
20
echo $?
21
echo after: f = $f
22
23
f=0
24
FUNCNEST=0
25
foo
26
echo $?
27
echo after FUNCNEST reset: f = $f
28
29
f=0
30
unset FUNCNEST
31
foo
32
echo $?
33
echo after FUNCNEST unset: f = $f
34
35
FUNCNEST=20
36
f=$(( FUNCNEST - 2 ))
37
foo
38
echo $?
39
echo after FUNCNEST assign: f = $f