annotate tests/mini/unrolled.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/unrolled.d@d9d5d59873d8
children
rev   line source
lindquist@15 1 module unrolled;
lindquist@15 2
lindquist@270 3 extern(C) int printf(char*, ...);
lindquist@270 4
lindquist@15 5 void test(T...)(T t) {
lindquist@15 6 foreach (value; t) {
lindquist@15 7 printf("%d\n", value);
lindquist@15 8 if (value == 2)
lindquist@15 9 break;
lindquist@15 10 }
lindquist@15 11 }
lindquist@15 12
lindquist@15 13 void main() {
lindquist@15 14 test(1,4,3);
lindquist@15 15 }