>What is the slickest way to figure out if alpha characters are in a string
>such as:
>
>x = "234e593"
>? DoesItContainAlpha(x) && Returns .T.
>
>y = "1345.00"
>? DoesIt ContainAlpha(y) && Returns .F.
>
>I can cycle through the whole alphabet and see if one of the
>characters are contained in the string, but that seems to
>long......
>
>Does anyone know a quicker way?
>Thanks,
>Dan
Basically, you can use chrtran(). This can be done in several ways; for instance:
? len(chrtran(alltrim(MyField), "abcdefghijklmnopqrstuvwxyz", "") # len(alltrim(MyField)
That is, all letters (only lowercase, in my example) are wiped out; if the length varies, then there were letters.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)