[Sorry about other blank email, I'm blaming it on Kmail. Ya know, KDE is getting
there!]

Thanks for that tid bit, I'll update the code, update the version number and
re-upload it to sunsite!

Darn, someone just informed me random number generation is included by default
in zsh. echo $RANDOM will give you one "every time" so I was told. But still, my
little proggie has merit on systems that cannot, or by operator prejudice, don't
have zsh, and still want to have access to random numbers for shell scripts. :)

Brock

On Sat, 23 May 1998, Jakob Andreas Baerentzen wrote:
>On Wed, 20 May 1998, R. Brock Lynn wrote:
>> 
>> It is supposed to generate random integers in a certain range specified by two
>> endpoints inclusive. i.e.: randomit 10 100 will send to stdout a random long int
>> between 10 and 100. should work for negative numbers too.
>> 
>> My code is included. Please give me some comments!
>
>There is one little problem that I have run into before
>
>
>  srand ( time ( 0 ) ) ;
>
>initializes the random number generator with the current time - and the
>time is measured in seconds. This means that if you call randomit two
>times during one second, you get the same random number.
>
>You should, probably, use
>
>srand(times(0));
>
>times(0) returns the number of clock ticks since system was brought up,
>and ``a tick'' seems to be one hundredth of a second.

Reply via email to