Vote UpVote

Delphi: RandomizeIfNeeded

The Wiert Corner – Calling Randomize too often can make your Random numbers even less random. Sometimes having the Randomize call in a unit initialization section is not practical. Hence this little method that I think I first wrote back in the Turbo Pascal days: procedure RandomizeIfNeeded(); begin if RandSeed = 0 then Randomize(); end; –jeroenFiled under: Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, ...
Favorite? Off-Topic? Jeroen Pluimers @ 2014-10-07 07:00


Visits: 1265
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Jim McKeeth
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)