Iterate over two arguments at once

bachmeier via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 19 11:25:01 PDT 2016


On Monday, 19 September 2016 at 18:10:22 UTC, bachmeier wrote:
> Suppose I want to iterate over two arrays at once:
>
> foreach(v1, v2; [1.5, 2.5, 3.5], [4.5, 5.5, 6.5]) {
>   ...
> }
>
> I have seen a way to do this but cannot remember what it is and 
> cannot find it.

Thanks for the replies. This is what I needed.


More information about the Digitalmars-d-learn mailing list