[thelist] IsNumeric() vs. Val()

Erik Mattheis gozz at gozz.com
Wed Feb 27 01:43:01 CST 2002


At 11:24 PM -0800 2/26/02, jeff wrote:
>IsNumeric() returns a boolean if the string that's passed to it is a valid
>number.  Val(), on the other hand, attempts to return a number from a string
>that's passed to it.  if it can't convert, it returns 0 (zero).  in and of
>itself, this can be used as a boolean check as well since 0 is false and
>anything else is true.  a word of caution with the use of Val() though, it
>can't handle integers of more than 10 digits long.  the following:

Duh, I feel silly ... long, extended brain fart. A few months ago I
looked at some code I think you wrote and saw you used Val() which
I've never used so looked it up ... I was thinking of it in the
context of using it to make sure something was a number before I used
it in a query ... so in my mind Val did nothing but 0 == false and
[anything else] == true. Is there a reason why evolt.org Val()
instead of IsNumeric() to do this validation?
--

__________________________________________
- Erik Mattheis

(612) 377 2272
http://goZz.com/

__________________________________________



More information about the thelist mailing list