Mercurial > projects > dstress
view run/f/for_06_E.d @ 1535:20d8ee6523e1
updated to DMD-1.013
author | thomask |
---|---|
date | Mon, 07 May 2007 05:19:57 +0000 |
parents | b8c0195059d9 |
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_E; int foo(ref real[] arr) { size_t i = 2; int counter; for(size_t j = arr.length-1; j >= i; j--) { arr[j] = arr[j - i]; counter++; } return counter; } int main(){ real[] array; array.length = 2; if(foo(array)==0){ return 0; }else{ return 1; } }