Random routine
- Posted by Caballero Rojo <pampeano at ROCKETMAIL.COM> Jan 31, 2000
- 457 views
Hello people again, A simple routine came to my mind, I think it's "idiot" in someway, but maybe you can find it useful for something. -- Code starts function ps_rand(integer max, -- the maximum random number integer pos -- the number of possibilities to choose ) --from object temp temp = {} for I = 1 to pos do temp = append(temp, rand(max)) end for temp = temp[rand(pos)] return temp end function object a a = ps_rand(10,20) ? a -- Code ends That's all. Keep working and giving good ideas. -- Best regards, Caballero Rojo mailto:pampeano at rocketmail.com __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com