Sign in to follow this  
Followers 0
Vindicator209

Whole Number in string?

3 posts in this topic

Hey guys, is it possible to find a way figure out if a string's number is a whole number or not? As if i were trying to seperate the ones with decimal places and the ones with whole numbers? And how?

Thanks!


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$string = 10.241

If IsInt($string) Then

Msgbox(0,"",$string & " is a whole number")

Else

Msgbox(0,"",$string & " is not a whole number")

Endif

$string1 = 10

If IsInt($string1) Then

Msgbox(0,"",$string1 & " is a whole number")

Else

Msgbox(0,"",$string1 & " is not a whole number")

Endif

Edited by darkshadow791

Share this post


Link to post
Share on other sites

Thx u!!!


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0