Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-28-2000, 04:23 PM   #1
Member (7 bit)
 
Join Date: Sep 1999
Posts: 79
Question

How can I set the random funciton to a range
let's say from 3 to 8
or from a to b
you get the point
ReBeL is offline   Reply With Quote
Old 09-29-2000, 03:28 PM   #2
Member (2 bit)
 
Join Date: Sep 2000
Posts: 2
First find the range of the random values you want.
3 to 8 , 3 4 5 6 7 8 or max - min value so you have 6 possible values. Then calculate your offset which is 3 in this case. take the output of RANDOM(6) and add the offset of 3 to obtain a random value in the range of [3,8].

For A to Z you would use their decimal value equivilants 65 to 90 and use the same preceedure above.

- gibben
gibben is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:26 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0