Kuraudo wrote: > [...] you can't argue that it's invalid in terms of robustness and general utility;
Oh, it is quite so, since when you're doing the check specifically to check if a string is all-numbers, and that check returns true even if it isn't, then not only does it miss the entire point of making such a check in the first place but of course you can't rely on it. And in the cases you mentioned that you're going to convert the string with text2num() anyway, calling an external proc to check if a number can be produced with it from the string first (not to mention one that calls text2num() itself to do so) is quite... unintelligent, since you just need to call text2num(), storing the value returned and seeing if it's a non-null one or not, then if it isn't, go on about using it. No need to use an external proc for that, and end up calling text2num() twice as well. |
|