Re: code-block
That'll work, but I'd do it this way:
function rand_not( integer x )
integer r
r = rand( max-1 )
if r >= x then r += 1 end if
return r
end function
You're guaranteed to only have one call to rand().
Matt
--- "Darth Maul, aka Matt" <uglyfish87 at HOTMAIL.COM> wrote:
> function anything_but(integer x)
> integer i i=x
> while i=x do i=rand(yourmaximumhere) end while
> return i
> end function
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
|
Not Categorized, Please Help
|
|