Page 1 of 1
input a number, with input() ???
Posted: Sun Feb 20, 2011 5:14 am
by spiral72
I'm trying to use input() to accept a number from the keyboard. It doesn't work since this is a string instruction.
Is there another version if input() that will accept a number?? Or is there a work-around???
My searches come up with nothing.

Re: input a number, with input() ???
Posted: Sun Feb 20, 2011 5:17 am
by spiral72
Actually, more correctly, I "CAN" type a number in for the input() entry, but it's just a string which happens to contain numeric digits.
It'd be real nice if I could, something like:
a = input()
Re: input a number, with input() ???
Posted: Sun Feb 20, 2011 5:18 am
by ts-soft
Code: Select all
If OpenConsole()
Print("Number please: ")
Number = Val(Input())
Debug Number
EndIf
Re: input a number, with input() ???
Posted: Sun Feb 20, 2011 5:33 am
by spiral72
AH! Thank you! It works perfectly
and thank you for the fast response.