On Thursday, 4 June 2015 at 17:25:52 UTC, Alex Parrill wrote:
On Thursday, 4 June 2015 at 17:04:06 UTC, jmh530 wrote:
float output[len];
This creates a fixed-sized array of length `len` (using the
deprecated syntax). Since the length is part of the type, it
needs to be known at compi
On Thursday, 4 June 2015 at 17:04:06 UTC, jmh530 wrote:
float output[len];
This creates a fixed-sized array of length `len` (using the
deprecated syntax). Since the length is part of the type, it
needs to be known at compile time.
You probably want a dynamic array instead. `auto out
I'm trying to run the following code (to create an array of
uniform random variables) on the latest version of rdmd (2.067.1).
import std.random;
auto uniform_array(int len, float a, float b) {
Random gen;
float output[len];
foreach(ref float i; output)
{