Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Can I seed srand() with results from rand()?

by clintp (Curate)
on Jul 10, 2003 at 02:47 UTC ( #272876=note: print w/replies, xml ) Need Help??


in reply to Can I seed srand() with results from rand()?

When I'm debugging something that I want to have pseudorandom behavior in real life, I use srand() with a constant to make the results predictable during debugging. Once I'm satisfied that things are working properly, I chuck the srand() completely (5.6+) and let things go.
  • Comment on Re: Can I seed srand() with results from rand()?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272876]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2023-03-20 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?