Non-repeating Random Numbers

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43035
interpreted = N
texte = I'm building a lotto site for a client and they want a RNG...ok, so I've got this much figured out:Generate 6 random numbers between 1 and 54:[loop start=1&end=6&advance=1] [math]ceil([RANDOM format=float]*(54))[/math] [/loop]How do I simply and elegantly ensure that all six numbers are different? By simply and elegantly I mean without resorting to any temp .dbs or anything like that.Thanks,-Dan ------------------------------------------- http://www.StrongGraphicDesign.com (208) 319-0137 | Toll-free p/f 877-561-1656------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Non-repeating Random Numbers - CORRECTION (Dan Strong 2002)
  2. Re: Non-repeating Random Numbers - CORRECTION (Brian Fries 2002)
  3. Re: Non-repeating Random Numbers - CORRECTION (Stuart Tremain 2002)
  4. Re: Non-repeating Random Numbers - CORRECTION (Dan Strong 2002)
  5. Re: Non-repeating Random Numbers - CORRECTION (Stuart Tremain 2002)
  6. Re: Non-repeating Random Numbers - CORRECTION (Andrew Simpson 2002)
  7. Re: Non-repeating Random Numbers - CORRECTION (Andrew Simpson 2002)
  8. Re: Non-repeating Random Numbers (Andrew Simpson 2002)
  9. Re: Non-repeating Random Numbers - CORRECTION (Dan Strong 2002)
  10. Re: Non-repeating Random Numbers - CORRECTION (Dan Strong 2002)
  11. Re: Non-repeating Random Numbers (Dan Strong 2002)
  12. Re: Non-repeating Random Numbers (John Peacock 2002)
  13. Non-repeating Random Numbers (Dan Strong 2002)
I'm building a lotto site for a client and they want a RNG...ok, so I've got this much figured out:Generate 6 random numbers between 1 and 54:[loop start=1&end=6&advance=1] [math]ceil([RANDOM format=float]*(54))[/math] [/loop]How do I simply and elegantly ensure that all six numbers are different? By simply and elegantly I mean without resorting to any temp .dbs or anything like that.Thanks,-Dan ------------------------------------------- http://www.StrongGraphicDesign.com (208) 319-0137 | Toll-free p/f 877-561-1656------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Dan Strong

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Search/sort in URL Was: GuestBook example (1997) OT: Yahoo email errors...... (2006) shipCost not working v2.1b4 (1997) Quiz question: Return all green and blank records? (2001) Another IfThenElse question.. (2003) Many are called but only 6 make it to founditems. (2001) Tenon and PCS Partner (1998) Math with Time (1997) WebSTAR and WebSTAR/SSL with WebCatalog plugins (1998) Pull Down Search (2000) wow (1998) Add to a field (1998) ShowNext - This is Killing me! (1998) OFF-TOPIC: Lending investors ... (2002) OLD ORDERS (1998) Re:2nd WebCatalog2 Feature Request (1996) Ok here is a question? (1997) Sort Order on a page search (1997) [Summary] re: Emailer setup (1997) WebCatalog 4.0.2b5 available (2000)