Mercurial > projects > dstress
view run/f/for_06_R.d @ 1489:b8c0195059d9
changed nntp: URLs to http: URLs
author | thomask |
---|---|
date | Mon, 09 Apr 2007 13:47:01 +0000 |
parents | 9dcac8d4e97f |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Deewiant <deewiant.doesnotlike.spam@gmail.com> // @date@ 2005-08-06 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4699 module dstress.run.f.for_06_R; int foo(real[] arr) { size_t i = 1; int counter; for(size_t j = arr.length-1; j >= i; j--) { arr[j] = arr[j - i]; counter++; } return counter; } int main(){ real[2] array; if(foo(array)==1){ return 0; }else{ return 1; } }