annotate tests/mini/foreach2.d @ 883:b52d5de7783f

GC defines and linkage changes.
author Christian Kamm <kamm incasoftware de>
date Thu, 08 Jan 2009 18:20:02 +0100
parents 1bb99290e03a
children
rev   line source
lindquist@34 1 module foreach2;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@34 3 void main()
lindquist@34 4 {
lindquist@34 5 static arr = [1.0, 2.0, 4.0, 8.0, 16.0];
lindquist@34 6 foreach(i,v; arr)
lindquist@34 7 {
lindquist@34 8 printf("arr[%d] = %f\n", i, v);
lindquist@34 9 }
lindquist@34 10 printf("-------------------------------\n");
lindquist@34 11 foreach_reverse(i,v; arr)
lindquist@34 12 {
lindquist@34 13 printf("arr[%d] = %f\n", i, v);
lindquist@34 14 }
lindquist@34 15 }