"Nicolas R Cueto" <[EMAIL PROTECTED]> wrote:

> How would I script a random function so as to prevent the same item being
> picked more than once?

The suggestions already posted work, but I thought I'd throw in my
version too just for variety:

put "1,6,34,89,78,3,28" into theList
put random(the number of items in theList) into theItemNum
-- do something with item theItemNum of theList here
delete item theItemNum of theList

This extracts a random item from the list, stores it in a variable, and
then deletes the item from the list. This technique allows you to use
your original list over and over to extract random items without ever
getting the same item twice.

-- 
Jacqueline Landman Gay        |             [EMAIL PROTECTED]
HyperActive Software          |                   [EMAIL PROTECTED]
Custom hypermedia solutions   |         http://www.hyperactivesw.com
612.724.1596                  |                   612.724.1562 - fax

Reply via email to