Mercurial > projects > ldc
view tests/mini/foreach7.d @ 989:420ef073448d
Forgot new files that were supposed to be in last commit.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 14:13:27 +0100 |
parents | 1bb99290e03a |
children |
line wrap: on
line source
module foreach7; void main() { int[4] a = [1,2,3,4]; int i; foreach(v; a[0..3]) { i += v; } assert(i == 6); }