GaryFrost Posted February 9, 2006 Share Posted February 9, 2006 (edited) from the help (beta 3.1.1.107) Variants can be of two base types: Strings and Numbers. Additionally, a number can be whole (integer) or fractional/floating-point. if i read it correctly both should return 1 but they don't MsgBox(0,"IsNumber", IsNumber(0)) MsgBox(0,"IsNumber", IsNumber("0")) Edited February 9, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Oxin8 Posted February 9, 2006 Share Posted February 9, 2006 Maybe it's some sort of mistype because I found this in the help file. Not the same thing but similar enough: IsInt(-12345) ;returns 1 IsInt(3.0000) ;returns 1 IsInt("5432") ;returns 0 since is a string IsInt(7.5 - 4.5) ;returns 1 since evaluates to integer 3 IsFloat(3.14159) ;returns 1 IsFloat(3.000) ;returns 0 since value is integer 3 IsFloat(1/2 - 5) ;returns 1 IsFloat(1.5e3) ;returns 0 since 1.5e3 = 1500 IsFloat("12.345") ;returns 0 since is a string ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
BigDod Posted February 9, 2006 Share Posted February 9, 2006 from the help (beta 3.1.1.107)Variants can be of two base types: Strings and Numbers. Additionally, a number can be whole (integer) or fractional/floating-point.if i read it correctly both should return 1 but they don'tMsgBox(0,"IsNumber", IsNumber(0))MsgBox(0,"IsNumber", IsNumber("0"))I am going to stick my neck out and say it is an incorrect assumption. As soon as you place the quotes inside the brackets you have included a string into it which I would always expect failure. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
GaryFrost Posted February 9, 2006 Author Share Posted February 9, 2006 I am going to stick my neck out and say it is an incorrect assumption. As soon as you place the quotes inside the brackets you have included a string into it which I would always expect failure. I think your right, had to dig through some code and remembered a problem with the sort routine for the GuiListViewfound i ended up using StringIsInt and StringIsFloatGary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now