[futurebasic] Re: [FB] Newbie array question - using FB II

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2001 : Group Archive : Group : All Groups

From: tedd <tedd@...>
Date: Mon, 12 Nov 2001 14:44:15 -0500
>Why not?
>Because from what I have understood, the problem Jeffrey was having
>was with the 50th item (must be a number between 1 and 49 and also
>it must be in a random location). I'm not sure I have fully
>understood the question though.

Oh, I didn't catch that. I was thinking that all the indexes should 
be included in the random thing and as such a RND(50) function does 
return numbers of 1 through 50.

>  > However, the RND(50) function means that it is returning a number "at
>>  random" between 0 and 51 (x>0 AND x<51). It may return, and most
>>  probably will return, the same number more than once in 50 calls. As
>>  such, then the values of some indexes will be moved to other indexes
>>  while others aren't moved at all (rather moved to themselves). It's
>>  an interesting solution and was not obvious to me.
>>
>OK, but when a value is not moved, say when index = 1 and the RND
>function returns 1, this doesn't stop the value at index 1 to be
>moved later, say when index = 6 and RND(50) returns 1 again.
>Ingenious, no?
>--
>
>Cheers
>
>Alain

Yes, it is ingenious. However, when it is done that way, then there 
are other indexes which are not touched.

No disagreement, just investigating the logic.

tedd

-- 
http://sperling.com