random numbers

I've been using Rnd(X + 1) to make random numbers, sometimes i see "odd" things, am i paranoid?
Is it truly "random", either way, what others ways are their to randomize numbers?
thnx

Comments

  • : I've been using Rnd(X + 1) to make random numbers, sometimes i see "odd" things, am i paranoid?
    : Is it truly "random", either way, what others ways are their to randomize numbers?
    : thnx
    :

    Use Randomize first to initialize a Random Random number. If you don't the numbers will be random while running the app, but will result in the same random values the next time you run the app.

    Call Randomize once at the beginning of your program.
    Then for Random integers:
    RandomInt = Int(Rnd * Count) + LBound
    LBound is the lower boundry
    For Count you could also write (UBound - LBound + 1)

    Greets...
    Richard

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion