Re: Check for numerical values by Rick
Rick
Wed Feb 04 10:12:14 CST 2004
Roger,
No, at least not directly. You might be able to use it in a function =
that's got other code. Can you post some code that "someone" suggested?
Eric's code looks good as long as you only want to consider positive =
integers.=20
Rick
"Roger" <someone@microsoft.com> wrote in message =
news:eGyPAJz6DHA.2996@tk2msftngp13.phx.gbl...
> Thanks guys,
>=20
> someone also told me I can use TYPE()... is this true?
>=20
>=20
> "Eric den Doop" <ericdendoop@xspamblockxfoxite.com> wrote in message
> news:e$28vly6DHA.2952@TK2MSFTNGP09.phx.gbl...
> > Hello, Roger!
> > You wrote on Wed, 4 Feb 2004 08:55:24 -0500:
> >
> > R> How do I verify a string is a numerical value?
> >
> > ?IsStringNumeric("123456")
> > ?IsStringNumeric("123456A")
> > FUNCTION IsStringNumeric(tcString AS String)
> > RETURN LEN(CHRTRAN(tcString, CHRTRAN(tcString, =
"0123456789",""),"")) =3D
> > LEN(tcString)
> > ENDFUNC
> >
> > --=20
> > Eric den Doop
> > www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By =
VFP8
> >
> >
>=20
>