Jump to content

Talk:Determine if a string is numeric: Difference between revisions

no edit summary
No edit summary
Line 118:
 
I don't know if you want to call it "incorrect", but I think the second MATLAB solution would call "...." numeric. I don't see any way of determining that there is only one decimal point in the string. --[[User:Mwn3d|Mwn3d]] 15:59, 2 February 2012 (UTC)
 
== Problem with the VB.net example ==
 
The IsNumeric call will not always return a correct answer. Try "1234+" - IsNumeric will return True. Then pass this same value as an argument to Convert.ToDouble: it will fail "unhandled exception". There's no option but to loop thru the String character by character and check that each one is within range. --[[User:LazyZee|LazyZee]] 17:59, 19 October 2012 (UTC)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.