in reply to rand and srand across builds and platforms?

I got the same as you on these two versions of ActivePerl:

This is perl, v5.8.0 built for MSWin32-x86-multi-thread This is perl, v5.6.1 built for MSWin32-x86-multi-thread

Replies are listed 'Best First'.
Re^2: rand and srand across builds and platforms?
by BrowserUk (Patriarch) on Mar 08, 2005 at 15:57 UTC

    Thanks. I'd tried AS 5.6.1/5.6.2/5.8.4/5.8.5/5.8.6 and home-built versions (using the same compiler as AS) of the latter two and got consistant results.

    From the responses, it seems likely that the underlying C-library/compiler has a lot to do with the result. Either just how the rands are generated or possibly srand uses an initialisation that is platform dependant.

    It just makes testing randomly generated test sequences harder to verify than if it were consistant across builds and platforms.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.