Page 1 of 1

PostPosted: Sun Jan 28, 2001 4:25 pm
by Velvis
I have user input that is placed into a string variable. I'd like to be able to know if the value stored in the variable is a number or a text character/string.

Is there a way to do this?


PostPosted: Sun Jan 28, 2001 5:17 pm
by Moonlite
I think this might work, but I'm not sure.

int number
string usersaid
number = usersaid
if(number == 0){
//do something with usersaid
} else{
//do something with number

Of course, this will only work if you know the number will not be 0. It really depends. Hope this will help you!