>> if not error? try [ a: load "66436436" ] [ integer? a ]
== true
>> if not error? try [ a: load "66436fdsaf436" ] [ integer? a ]
== none
>>
Daan Oosterveld
Mat Bettinson schreef:
> Folks,
>
> This is a dead basic one and I'm sure I'll feel stupid when someone
> points it out.
>
> Anyway, I have a function which is fed a string. Now I'd like to test
> to see if the string is purely numerical.
>
> I guess parse is the right way of doing it and I've seen examples but
> something basic like
>
> digits: charset [1234567890]
> parse number [digits]
>
> type? and so on appears useless since I KNOW it's a string. I even
> tried using error? try[] to trap an error converting to an integer -
> no luck with that either.
>
> --
> Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee
> http://www.eurogamer.net | http://www.eurogamer-network.com
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.