-
June 30th, 2014, 04:22 PM
#1
[RESOLVED] How to detect if a variable is a Double, Int, Float Or A String <Beginner>
Hey, what is going on guys. I Just thought of something and to see if it is possible. I was gonna see what kind of method or function I would have to use to detect and see if a user input entered a string, double, or a float. Say the user was to enter a word and it cannot be a float, double, nor an int. Only a letter or word. Then it prompts to you saying that you cannot enter a number or number with decimals in this dialog. Also vice-versa. I know that a while or for loop would probably make it easier. I just dont know were to find documentations on different functions and classes. Mostly how to use them with custom made variables like I'm trying to detect with. Anything will help.
Last edited by Dylan3dx; June 30th, 2014 at 04:24 PM.
-
June 30th, 2014, 06:05 PM
#2
Re: How to detect if a variable is a Double, Int, Float Or A String <Beginner>
-
June 30th, 2014, 11:17 PM
#3
Re: How to detect if a variable is a Double, Int, Float Or A String <Beginner>
Originally Posted by dglienna
Okay this helps. This is what i wanted to see. I completely forgot about try and catch wow. Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|