Re: std.random:uniform - uncompilable example from docs

2009-05-10 Thread bearophile
Christopher Wright: > It would be cool if DDoc could incorporate unittest examples -- it's in > a doc comment and a unittest, changes automatically propagated between > the two, so if your unittest succeeds, the documentation is probably at > least somewhat correct. Having something like the Py

Re: std.random:uniform - uncompilable example from docs

2009-05-10 Thread Christopher Wright
Tyro[a.c.edwards] wrote: http://www.digitalmars.com/d/2.0/phobos/std_random.html#uniform Above documentation provides the following example: Random gen(unpredictableSeed); // Generate an integer in [0, 1023] auto a = uniform(0, 1024, gen); // Generate a float in [0, 1) auto

std.random:uniform - uncompilable example from docs

2009-05-09 Thread Tyro[a.c.edwards]
http://www.digitalmars.com/d/2.0/phobos/std_random.html#uniform Above documentation provides the following example: Random gen(unpredictableSeed); // Generate an integer in [0, 1023] auto a = uniform(0, 1024, gen); // Generate a float in [0, 1) auto a = u