NO

Author Topic: Functions similar to randomize()  (Read 4083 times)

boral

  • Guest
Functions similar to randomize()
« 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 ?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Functions similar to randomize()
« Reply #1 on: July 23, 2013, 05:57:29 PM »
randomize() is BASIC.
Open help and search for rand() function.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

boral

  • Guest
Re: Functions similar to randomize()
« Reply #2 on: July 23, 2013, 06:10:19 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.

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: Functions similar to randomize()
« Reply #3 on: July 23, 2013, 11:57:39 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

Miki

  • Guest
Re: Functions similar to randomize()
« Reply #4 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/

I hope this helps.

:Miki.