[fpc-devel] I get duplicate GUIDs under Linux

Florian Klaempfl florian at freepascal.org
Mon Jun 2 10:01:22 CEST 2008


Graeme Geldenhuys schrieb:
> On 31/05/2008, Vinzent Höfler <JeLlyFish.software at gmx.net> wrote:
>>> Note that random() will always return the same sequence if you don't call
>> randomize() once in the program.
>>  Yes. But don't make the mistake to call it more than once.
> 
> Why can't FPC automatically call randomize() in the RTL. Put it in
> some initialization section. That way, at application startup,
> randomize() is already called and only Random() needs to be used?
> 
> I could never figure out why this wasn't done in Delphi either?  After
> all, if you use Random(), you want something random, yet many
> developers make the common mistakes of not calling Randomize() or
> calling it to often.  If FPC handled that for us, nobody would every
> make those mistakes again!

People might want to start with a defined randseed to reproduce behaviour.



More information about the fpc-devel mailing list