Random #'s

D.Rothe drothe at optusnet.com.au
Thu Jan 27 04:31:39 EST 2005


Hi All, 
I am using the following code to generate a field of 6 random numbers.

repeat 5 times --generate list of 5 random numbers between 1-10
put random(10) & "," after tRnum 
end repeat
delete last char of tRnum --delete last comma
put tRnum into fld "numbers"

this works fine but some numbers are repeated in the field, e.g (1,2,3,1,5)
How can I include only unique numbers?

Cheers......Dwayne



More information about the use-livecode mailing list