comparison run/foreach_10.d @ 1535:20d8ee6523e1

updated to DMD-1.013
author thomask
date Mon, 07 May 2007 05:19:57 +0000
parents f87ba6507260
children
comparison
equal deleted inserted replaced
1534:345207906be7 1535:20d8ee6523e1
12 array[0]=0.0; 12 array[0]=0.0;
13 array[1]=4.0; 13 array[1]=4.0;
14 array[2]=8.0; 14 array[2]=8.0;
15 } 15 }
16 16
17 int opApply(int delegate(inout double) dg){ 17 int opApply(int delegate(ref double) dg){
18 double result; 18 double result;
19 for(int i=0; i<array.length; i++){ 19 for(int i=0; i<array.length; i++){
20 result = dg(array[i]); 20 result = dg(array[i]);
21 if(result){ 21 if(result){
22 return i; 22 return i;