annotate tests/mini/foreach1.d @ 1651:cb960b882ca3 tip

bindings were moved to dsource.org/projects/bindings/
author Moritz Warning <moritzwarning@web.de>
date Thu, 20 May 2010 20:05:03 +0200
parents 1bb99290e03a
children
rev   line source
lindquist@33 1 module foreach1;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@33 3
lindquist@33 4 void main()
lindquist@33 5 {
lindquist@33 6 static arr = [1,2,3,4,5];
lindquist@33 7
lindquist@270 8 printf("forward");
lindquist@33 9 foreach(v;arr) {
lindquist@270 10 printf(" %d",v);
lindquist@33 11 }
lindquist@270 12 printf("\nreverse");
lindquist@33 13 foreach_reverse(v;arr) {
lindquist@270 14 printf(" %d",v);
lindquist@33 15 }
lindquist@270 16 printf("\n");
lindquist@33 17 }