Foreach loop behaviour and manipulation

Binarydepth binarydepth at gmail.com
Mon Dec 2 06:56:40 PST 2013


>     foreach (immutable t; 1 .. 51)
>     {
>         int temp = (((t * 20) + 420) * 5) + 3;
>         arr[t - 1] = temp - a;
>         temp = (((t * 5) + 50) * 20) + 1013;
>         arr[t] = temp - a;
>     }

Good work with the parenthesis. :)


More information about the Digitalmars-d-learn mailing list