j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Doesn't this initialize the seed to 0 if
(Time millisecondClockValue bitAnd: 16r3FFFFFFF) = (self hash + 1)?
That is, I think you need to bind the #bitXor: tighter than the #+, as in:
seed := ((Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash) + 1.
W
You can't win if the time is, ferinstance, 16r55555555 and the hash is 16rAAAAAAAA then your expression will be zero. (very unlikely that but... :-). If you really want to be safe you will have to put in an explicit test for zero. :-(
Pat Caudill
squeak-dev@lists.squeakfoundation.org