]>
Commit | Line | Data |
---|---|---|
8868edaf CR |
1 | # This program is free software: you can redistribute it and/or modify |
2 | # it under the terms of the GNU General Public License as published by | |
3 | # the Free Software Foundation, either version 3 of the License, or | |
4 | # (at your option) any later version. | |
5 | # | |
6 | # This program is distributed in the hope that it will be useful, | |
7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
9 | # GNU General Public License for more details. | |
10 | # | |
11 | # You should have received a copy of the GNU General Public License | |
12 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
13 | # | |
7117c2d2 JA |
14 | fff() |
15 | { | |
16 | typeset i=0 x=10 | |
17 | echo "|$i|$x|" | |
18 | export x | |
19 | printenv x | |
20 | } | |
21 | ||
22 | fff2() | |
23 | { | |
24 | echo "|$x|" | |
25 | export x | |
26 | printenv x | |
27 | } | |
28 | ||
29 | fff3() | |
30 | { | |
31 | typeset i=0 x="${x-10}" | |
32 | echo "|$i|$x|" | |
33 | } | |
34 | ||
35 | fff4() | |
36 | { | |
37 | typeset i=0 x | |
38 | x="${x-10}" | |
39 | echo "|$i|$x|" | |
40 | } | |
41 | ||
42 | fff5() | |
43 | { | |
44 | z=y typeset z | |
45 | echo "|$z|" | |
46 | } | |
47 | ||
48 | fff | |
49 | x=10 fff | |
50 | x=1 fff | |
51 | x=4 fff2 | |
52 | x=11 fff3 | |
53 | echo after fff3: x=$x | |
54 | x=12 fff4 | |
55 | ||
56 | fff5 | |
57 | z=42 fff5 |