Results 1 to 3 of 3

Thread: about randomize number

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    How can i generate a same series of random number until press a button? I can't set the seeds to perform this action.

    for example:
    when press named "A" button to generate a series of number(1,2,3,4,7...), and press it again, the series of number is still 1,2,3,4,5... until press anothe button

    one more question, it is possible to generate number in ascending or descending
    order?

  2. #2
    Guest

    Post

    Place Randomize before your Rnd function.


    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.


  3. #3
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Post

    If you want the series to repeat every time, put "Randomize" and an integer, for ex.:

    ------
    Randomize 5
    ------

    If you want the series to never repeat, put "Randomize" with no parameters:

    ------
    Randomize
    ------

    For your second question: if the numbers ar ordered they are not random!

    I guess you can generate a series of random numbers, assign them to an array and then sort that array.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width