Writeln does not prints if array has more than 500 elements
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 10 15:01:02 PDT 2015
On 06/10/2015 02:49 PM, kerdemdemir wrote:
> Hi
>
> Following code works
>
> int[] peopleMoney = iota(0, 500, 1).array();
> writeln(peopleMoney.map!(a => to!string(a)).joiner(" "));
> => 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
>
> It writes the contents to std.output as expected.
> But if I change 500 to 600 nothing is being printed.
>
> int[] peopleMoney = iota(0, 600, 1).array();
> writeln(peopleMoney.map!(a => to!string(a)).joiner(" "));
> ==> NOTHİNG PRINTS
>
> What am I doing wrong?
>
Works for me with DMD64 D Compiler v2.067.1. Can it be something else in
the program or the environment?
import std.stdio;
import std.range;
import std.algorithm;
import std.conv;
void main()
{
int[] peopleMoney = iota(0, 600, 1).array();
writeln(peopleMoney.map!(a => to!string(a)).joiner(" "));
}
Ali
More information about the Digitalmars-d-learn
mailing list