comparing 3 values

Results 1 to 2 of 2

Thread: comparing 3 values

  1. #1
    Kentium Guest

    Default comparing 3 values

    I have some content on my web site stored in an array-<BR><BR>Image(1)<BR>.<BR>.<BR>Image(4)<BR><BR>Late r, i&#039;ve got an index going through a randomizer to pull one of the images from the array.<BR><BR>DIM IndexSlot1,IndexSlot2,IndexSlot3<BR>Randomize &#039; Initialize random-number generator.<BR>IndexSlot1=Int((1 * Rnd) + 1) <BR>IndexSlot2=Int((3 * Rnd) + 1) <BR>IndexSlot3=Int((3 * Rnd) + 1)<BR><BR>I&#039;ve got three different spots I want 1 of the 4 images to populate, the trick is I don&#039;t want any of them to repeat.<BR><BR>Random images, in random positions- but no duplicates...<BR><BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Math Functions

    Didn&#039;t you just KNOW that I would have written an answer for this one a year or so ago? Just so I could give you a hard time this year?<BR><BR>[Oops...I just checked it out. It was last January. So not quite a year, at all. Darn. Lost that be with myself!]<BR><BR>Anyway, think of your 4 images as a deck of 4 cards from which you want to "deal" 3 and the Function in the FAQ does exactly what you want. <BR><BR>

Posting Permissions

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