Results 1 to 3 of 3

Thread: Variable array

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360

    Question

    OK here's the situation.
    I need to know if there are any (reasonably simple) ways to
    generate numbers. Ok here is where it gets confusing:
    If I enter a string of numbers i.e. 23423 and consider these "master numbers", that the individual "change numbers"
    can not be the same as.
    Example:
    If master is 23423
    The change numbers COULD be : 45879, 05645, etc.
    Also the individual numbers (say the first digit) can not be = to or (= to master +1) or (= to master -1).
    Now before you get too excited, THAT part of the problem I have solved, however the problem I am now having is that when the random changes are made, they CAN NOT be dupllicates of the changes already written. Man I hope this is understandable, I am fairly new at programming, I would apreciate any help.

  2. #2
    Junior Member
    Join Date
    Dec 1999
    Posts
    25

    Cool random #'s

    i would first recommend that any numbers that u are with in this program be placed into variables just so that there is no chance of them being replaced.

    Ok there is a decent randomizer in vb. check the help and it should show u how to use it. then all u have to do is match the random number against the ones u dont want it to match and the main one. a simple select case or nested if...then...else should do it. hope i have been of some help

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360

    Talking

    Thank you very much.
    I am dealing with up to 2000 different numbers, and wasn't sure if I should declare all of them, or use a variable array.
    Thanks for the tip though!

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