| Thread overview | ||||||
|---|---|---|---|---|---|---|
|
June 10, 2015 Writeln does not prints if array has more than 500 elements | ||||
|---|---|---|---|---|
| ||||
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?
| ||||
June 10, 2015 Re: Writeln does not prints if array has more than 500 elements | ||||
|---|---|---|---|---|
| ||||
Posted in reply to kerdemdemir | 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
| |||
June 10, 2015 Re: Writeln does not prints if array has more than 500 elements | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | I am running DMD on windows, my DMD version is DMD32 V2.067.1. It might be because I installed 32bit version on 64bit windows. | |||
June 10, 2015 Re: Writeln does not prints if array has more than 500 elements | ||||
|---|---|---|---|---|
| ||||
Posted in reply to kerdemdemir | On Wednesday, 10 June 2015 at 21:49:56 UTC, kerdemdemir wrote:
> ==> NOTHİNG PRINTS
>
> What am I doing wrong?
Which OS, which terminal ?
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply