Re: Non-repeating Random Numbers - CORRECTION

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43040
interpreted = N
texte = whoops... [showif [found]=5][break][/showif] should say 6, not 5... corrected code below:[!] --- Generate 6 unique numbers between 1 and 54 --- [/!] [text show=f]unique_numbers= [/text] [math show=f]found=0[/math] [loop start=1&end=20] [text show=f]random_number=[math]ceil([RANDOM format=float]*(54))[/math][/text] [showif [unique_numbers]! [random_number] ] [text show=f]unique_numbers=[unique_numbers][random_number] [/text] [math show=f]found=[found]+1[/math] [/showif] [showif [found]=6][break][/showif] [/loop] [unique_numbers]-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 - CORRECTION (Dan Strong 2002)
  9. Re: Non-repeating Random Numbers - CORRECTION (Dan Strong 2002)
whoops... [showif [found]=5][break][/showif] should say 6, not 5... corrected code below:[!] --- Generate 6 unique numbers between 1 and 54 --- [/!] [text show=f]unique_numbers= [/text] [math show=f]found=0[/math] [loop start=1&end=20] [text show=f]random_number=[math]ceil([RANDOM format=float]*(54))[/math][/text] [showif [unique_numbers]! [random_number] ] [text show=f]unique_numbers=[unique_numbers][random_number] [/text] [math show=f]found=[found]+1[/math] [/showif] [showif [found]=6][break][/showif] [/loop] [unique_numbers]-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:

IE Cache Problems... (1999) Summing fields (1997) WC 2.0 frames feature (1997) WebDNA deletes major DB data big time (2004) WC Database Format (1997) add to cart within a page? (1997) HTML editing and webcatalog (2000) WebCatalog 2.0 b 15 mac (1997) [REFERRER] AND Truncation (1998) Sorting by date (1997) RAM variables (1997) Custom WebCat Prefs ... (1997) WebCatalog for guestbook ? (1997) WebCat2b12plugin - [search] is broken ... not! (1997) Cool! formulas (1998) Dummy Credit Card Number for debug? (1997) unable to launch acgi in WebCat (1997) redirect from the errorsMessages.db entry (1997) Writefile outside WebSTAR hierarchy? (1997) Emailer problem (2000)