Anonymous user
Talk:Determine if a string is numeric: Difference between revisions
Talk:Determine if a string is numeric (view source)
Revision as of 17:59, 19 October 2012
, 11 years agono edit summary
(→Second MATLAB solution might have a problem: new section) |
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)
|