Re: [random] only for 1-100???

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13299
interpreted = N
texte = =>>>>>Is there anyway to specify the range of numbers [random] uses, rather than >>>>>the default 1-100? >> >>>>Use some math on the random number before you use the resulting >>>>number for your particular needs ... :) >> >>>Sure, sure. However, I was hoping just maybe I wouldn't have to massage >>>my data every time I need a random value other then between 1-100. Geez, >>>even Basic 2.0 on my old Commodore 64 had an RND function... >> >>All it takes is writing the WebDNA once, and then you have a solution >>you can re-use forever with minimal changes to accommodate your >>specific needs ... provided you write it right the first time.>Maybe you can give me a few hints? I'm not sure where to start in order to >make a proper random number generation routine which would be repurposable. >I'd need something that would handle everything from easy stuff like 1-10 >to things like 16-536. I think this would be handy code to have.When I've programmed this into other database software, I usually begin with the random number capabilities provided in the software, then I decide how to use that random number (with some math) to generate a random number from a defined range of values.If you want, I will write this random number WebDNA for WorldPoint so it works with whole numbers (not fractions) in exchange for this month's colocation fee (talk to James for approval) ... and then you'll be able to do exactly what you want in terms of selecting ranges of numbers, such as the 16-536 example above.Your only need from then on will be to figure out how to get the correct minimum and maximum values into the variable I create for them in the WebDNA code.How's that for a great deal! :)Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html Associated Messages, from the most recent to the oldest:

    
  1. Re: [random] only for 1-100??? (Kenneth Grome 1997)
  2. Re: [random] only for 1-100??? (Kenneth Grome 1997)
  3. Re: [random] only for 1-100??? (Kenneth Grome 1997)
  4. Re: [random] only for 1-100??? (Daniel Cameron 1997)
  5. Re: [random] only for 1-100??? (Daniel Cameron 1997)
  6. [random] only for 1-100??? (Daniel Cameron 1997)
=>>>>>Is there anyway to specify the range of numbers [random] uses, rather than >>>>>the default 1-100? >> >>>>Use some math on the random number before you use the resulting >>>>number for your particular needs ... :) >> >>>Sure, sure. However, I was hoping just maybe I wouldn't have to massage >>>my data every time I need a random value other then between 1-100. Geez, >>>even Basic 2.0 on my old Commodore 64 had an RND function... >> >>All it takes is writing the WebDNA once, and then you have a solution >>you can re-use forever with minimal changes to accommodate your >>specific needs ... provided you write it right the first time.>Maybe you can give me a few hints? I'm not sure where to start in order to >make a proper random number generation routine which would be repurposable. >I'd need something that would handle everything from easy stuff like 1-10 >to things like 16-536. I think this would be handy code to have.When I've programmed this into other database software, I usually begin with the random number capabilities provided in the software, then I decide how to use that random number (with some math) to generate a random number from a defined range of values.If you want, I will write this random number WebDNA for WorldPoint so it works with whole numbers (not fractions) in exchange for this month's colocation fee (talk to James for approval) ... and then you'll be able to do exactly what you want in terms of selecting ranges of numbers, such as the 16-536 example above.Your only need from then on will be to figure out how to get the correct minimum and maximum values into the variable I create for them in the WebDNA code.How's that for a great deal! :)Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html Kenneth Grome

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:

calculating ShipCost depending on weight (1997) WebCat2 - Getting to the browser's username/password data (1997) Summary search -- speed (1997) Protect (1997) Pirated WebCat? NOT... (2003) WebCat & WebTen (1997) WebDNA 4.5 & iTools 7 (2003) Bug Report, maybe (1997) ShowNext Command (1997) [WebDNA] [BULK] Databases No Longer Automatically Committing (2010) Searching multiple fields (1997) formulas.db ?? (1998) Here's how to kill a Butler Database. (1997) Help! WebCat2 bug (1997) Date Question (2002) open source development (2001) OT-JS question (2001) Country & Ship-to address & other fields ? (1997) AOL access problems (1998) [WaitForFile] wait for open file, not closed file (2001)