[fpc-devel] I get duplicate GUIDs under Linux

Marco van de Voort marcov at stack.nl
Mon Jun 2 09:49:43 CEST 2008


[ Charset ISO-8859-1 unsupported, converting... ]
> 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?

Then the whole random system is linked in, even when not used. 

Also when you would want to set a different randseed, you'd call it twice
(though I can't imagine that being such a problem nowadays)
 



More information about the fpc-devel mailing list