for ranges

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 22 08:48:51 PST 2015


> It works for me:

Sorry, you are right, it loops:

void main() {
     import std.stdio, std.bigint;

     immutable BigInt one = 1;
     immutable BigInt two = 2;
     uint n = 0;

     foreach (immutable i; two .. n + one)
         i.writeln;
}


Bye,
bearophile


More information about the Digitalmars-d-learn mailing list