I've spent 35 years programming in text and even animate text with using a print locate with loops that give the illusion the text is moving. Now I'm wanting learn graphics and animate with the help of the RND(x) statement. But I'm not seeing a way to generate a number between a range of numbers. Let's say between 500 and 1000. The RND(x) statement always generates from 0 to 1000 if x is 1000.
Anyone have a work around without adding IF/THEN to make it do over until the number falls between 500 to 1000? Many thanks.
Mort
Getting a random number range
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Getting a random number range
X=500+RND(500)
Re: Getting a random number range
That was so simple I must have programmer block. Thank you very much.
Mort
Mort