Pelles C forum

C language => Beginner questions => Topic started by: boral on July 23, 2013, 04:06:40 PM

Title: Functions similar to randomize()
Post by: boral on July 23, 2013, 04:06:40 PM
Pelles C does not support randomize() . Is there any function which is alternative to randomize() and is supported by Pelles C ?
Title: Re: Functions similar to randomize()
Post by: frankie on July 23, 2013, 05:57:29 PM
randomize() is BASIC.
Open help and search for rand() function.
Title: Re: Functions similar to randomize()
Post by: boral on July 23, 2013, 06:10:19 PM
Quote from: frankie on July 23, 2013, 05:57:29 PM
randomize() is BASIC.
Open help and search for rand() function.
Thanks for your reply. Can you please explain in brief how does the 'seed' works ? Thanks in advance.
Title: Re: Functions similar to randomize()
Post by: Bitbeisser on July 23, 2013, 11:57:39 PM
Quote from: boral on July 23, 2013, 06:10:19 PM
Quote from: frankie on July 23, 2013, 05:57:29 PM
randomize() is BASIC.
Open help and search for rand() function.
Thanks for your reply. Can you please explain in brief how does the 'seed' works ? Thanks in advance.
Well, you might better ask what part of the (pseudo)random number generation is unclear to you.

The 'seed' is a random (or not) starting value from which the (pseudo)random number generator starts to generate it's output. The same seed will result in the same sequence of generated numbers. Different seeds will result in different number sequences.

Ralf
Title: Re: Functions similar to randomize()
Post by: Miki on October 23, 2013, 12:36:51 AM
I found some ANSI C source code for a random number generator library.

http://www.cs.wm.edu/~va/software/park/ (http://www.cs.wm.edu/~va/software/park/)

I hope this helps.

:Miki.