Random Numbers

Ralph Main rmain1972 at live.com
Sat Aug 4 10:27:14 PDT 2012


On Saturday, 4 August 2012 at 16:59:09 UTC, Philippe Sigaud wrote:
> On Sat, Aug 4, 2012 at 6:40 PM, Ralph Main <rmain1972 at live.com> 
> wrote:
>
> Hello Ralph,
>
>> The module std.random documentation doesn't work as per the 
>> examples.
>> The example shows getting a random number by the following 
>> code does not
>> work:
> (snip)
>
> Both code samples you gave work perfectly for me (DMD 2.060, 
> Linux).
> Which version are you using?

DMD32 D Compiler v2.059 on Linux (Fedora 17)

All I know, is that it wasn't working, and I finally got it to 
work when I used the new keyword.

I tried the code in just main() like bearophile's post, and it 
worked just fine.  I also removed the new keyword from my program 
and it compiled.

The error message that I got yesterday with the example code 
returned an error message that had something do with void and 0 
arguments.

<shrug>

Thanks to both of you for the information.


More information about the Digitalmars-d-learn mailing list