annotate test/unrolled.d @ 15:37a4fdab33fc trunk

[svn r19] * Added support for reassigning 'this' inside class constructors. * Added preliminary support for UnrolledLoopStatement. That is foreach on a tuple.
author lindquist
date Wed, 03 Oct 2007 04:56:32 +0200
parents
children d9d5d59873d8
rev   line source
lindquist@15 1 module unrolled;
lindquist@15 2
lindquist@15 3 void test(T...)(T t) {
lindquist@15 4 foreach (value; t) {
lindquist@15 5 printf("%d\n", value);
lindquist@15 6 if (value == 2)
lindquist@15 7 break;
lindquist@15 8 }
lindquist@15 9 }
lindquist@15 10
lindquist@15 11 void main() {
lindquist@15 12 test(1,4,3);
lindquist@15 13 }