>VFP 6.0: Is there any function to display if my string is non numeric?
>ie:
>string: 123RTY234 (non numeric)
>string: FHE1234 (non n)
>string: 121345 (numeric)
>
>IsDigit() look only the first char...
>Val() returns zero if first char. is alphab.
>
>I would like to know if there is any NATIVE FUNCTION, if not.... I have to create one.
I can think of a couple, if you ignore the possibility of a multiplicity of decimal points, the simple LEN(CHRTRAN(ALLTRIM(MyStringToTest),'-0123456789.',''))=0 indicates a 'legal' numeric content; additional rules as to the position of a sign, the existance of no more than a single decimal point, the possibility of a scientific notation in a numeric, etc.