blob: 88dbc15fafa474d58cd439d9da515bde4c9e1822 [file] [log] [blame]
Denis Vlasenko1c660b42007-03-05 00:27:50 +000010
21
32
40
51
62
70
81
92
100
112
124
13fx is a function
Denis Vlasenkoc86e0522007-03-20 11:30:28 +000014fx ()
15{
Denis Vlasenko1c660b42007-03-05 00:27:50 +000016 i=0;
17 for ((1; i < 3; i++ ))
18 do
19 echo $i;
20 done;
21 for ((i=0; 1; i++ ))
22 do
23 if (( i >= 3 )); then
24 break;
25 fi;
26 echo $i;
27 done;
28 for ((i=0; i<3; 1))
29 do
30 echo $i;
31 (( i++ ));
32 done;
33 i=0;
34 for ((1; 1; 1))
35 do
36 if (( i > 2 )); then
37 break;
38 fi;
39 echo $i;
40 (( i++ ));
41 done;
42 i=0;
43 for ((1; 1; 1))
44 do
45 if (( i > 2 )); then
46 break;
47 fi;
48 echo $i;
49 (( i++ ));
50 done
51}
520
531
542
550
561
572
580
591
602
610
621
632
640
651
662
67./arith-for.tests: line 77: syntax error: arithmetic expression required
68./arith-for.tests: line 77: syntax error: `(( i=0; "i < 3" ))'
692
70./arith-for.tests: line 83: syntax error: `;' unexpected
71./arith-for.tests: line 83: syntax error: `(( i=0; i < 3; i++; 7 ))'
722
7320
7420