Mercurial > projects > dstress
view run/c/continue_04_A.d @ 1489:b8c0195059d9
changed nntp: URLs to http: URLs
author | thomask |
---|---|
date | Mon, 09 Apr 2007 13:47:01 +0000 |
parents | f4e98d870b57 |
children | 20d8ee6523e1 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Chris Miller <chris@dprogramming.com> // @date@ 2006-02-16 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=6288 module dstress.run.c.continue_04_A; struct MyStruct{ int opApply(int delegate(inout int i) dg){ for(int index=0; index < 3; index++){ dg(index); } return 0; } } int main(){ MyStruct foo; int sum; foreach(int i; foo){ sum += i; } if(sum == 3){ return 0; } }