-----Original Message-----
From: John Delisle <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: 22 February 2000 05:03
Subject: Re: Random Numbers
John
Most code that I've seen, seem to use the time in seconds for seeding the
random number generator.
The Hardball sample app that comes with codewarrior show how you can seed
SysRandom(), by calling TimGetTicks(), which returns the number of ticks(100
per sec) since the Palm was last turned on. i.e
SysRandom(TimGetTicks())
You could also use something like
SysRandom(TimGetSeconds())
Good Luck
Garth Watkins
Nomad Technologies
>Hehe..
>
>What do you typically use as the seed? Just some number? Or seed it with
>the time somehow?
>
>John
>
>
>"Ron Nicholson" <[EMAIL PROTECTED]> wrote in message
>news:2682@palm-dev-forum...
>>
>> Unfortunately, SysRandom() only produces pseudo-random numbers.
>> For random numbers, you might try hooking up a radioactive decay
>> counter or thermal noise diode to the serial port.
>>
>> Ron Nicholson
>> HotPaw
>> http://www.hotpaw.com/rhn/hotpaw/
>>
>> -
>> >Ralph Krausse wrote:
>> >
>> >SysRandom()
>> >
>> >> >Can someone help me to generate a random number?
>>
>>
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html