input number

Just starting out? Need help? Post your questions and find answers here.
Banaticus
User
User
Posts: 21
Joined: Fri Oct 24, 2003 5:49 am
Location: Redlands, CA
Contact:

input number

Post by Banaticus »

How do I get a number inputted?

I'd like to generate a random number from a number inputted by a user from the console.

user_seed=Input()
RandomSeed(user_seed)
first_random_number=Random(K)

But I receive an error when doing this, as Input() is assumed to be a string. What command should I use to allow a user to input a number?
--BX
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

use Val(user_seed) if it's an integer or ValF(user_seed) if it's a float.
Post Reply