Question about random number on AS 1.5.5
Question about random number on AS 1.5.5
- Subject: Question about random number on AS 1.5.5
- From: "Fernando O. Raineri" <email@hidden>
- Date: Sat, 24 Feb 2001 18:11:34 -0500
Hello. I have several scripts that make use of random numbers.
These scripts were functioning correctly on AS 1.4.3. About
two weeks ago I upgraded to Mac OS 9.1 (AS 1.5.5) on a
Wall Street PowerBook, and noticed the following issues:
1) I turn off my PowerBook every night, and start it again
the next morning. All the scripts that use the random number
are working correctly. However, it seems that each day the random
numbers are started from the same seed. In other words,
I seem to be generating the same sequence of random numbers
each time I turn on the PowerBook.
2) After reading the Standard Additions manual on the subject of
"random number", it is my understanding that if I use
random number with seed 0
a random number based on an independent seed is generated.
But, at least in my case, whenever I use "with seed 0" I always
generate the same random number. Maybe I'm understanding the
manual incorrectly?
I have "solved" problem (1) by first generating a random number
with HyperTalk, and then using this number as a seed in a 1-line AS
that I run first thing every morning. But I wonder if there
could be something wrong with my machine or Scripting Additions
or perhaps something else.
Generally I sun these scripts from the OSA menu, but the behavior is
the same with the Script Editor 1.5.5 or with Smile 1.7.5.
I would very much appreciate any comment or help. Thank you. Fernando