619
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Deewiant <deewiant.doesnotlike.spam@gmail.com>
|
|
6 // @date@ 2005-08-06
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4699
|
619
|
8
|
|
9 module dstress.run.f.for_06_I;
|
|
10
|
|
11 int foo(double[] arr) {
|
|
12 size_t i = 1;
|
|
13 int counter;
|
1091
|
14
|
619
|
15 for(size_t j = arr.length-1; j >= i; j--) {
|
|
16 arr[j] = arr[j - i];
|
|
17 counter++;
|
|
18 }
|
|
19
|
|
20 return counter;
|
|
21 }
|
|
22
|
|
23 int main(){
|
|
24 double[] array;
|
|
25 array.length = 2;
|
1091
|
26
|
619
|
27 if(foo(array)==1){
|
|
28 return 0;
|
|
29 }else{
|
|
30 return 1;
|
|
31 }
|
736
|
32 }
|