Hi Tracy,
During VFP9 beta I loged request to expand CAST() help topic with explanation how each type of conversion works but it was ignored by VFP team. W/o such documentation the result of conversation in many cases cannot be predicted or explained.
>Just curious, Sergey do you know why CAST works where VAL does not? Specifically a string with "2E" in it? I understand why VFP sees it as scientific notation, but CAST does not...
>
>lcvalue = "2E828"
>lcvalue1 = "200"
>? VAL(lcvalue)
>? CAST(lcvalue as Int)
>? VAL(lcvalue1)
>? CAST(lcvalue1 as Int)
>tclocation = "2E818 Main St"
>? CAST(GETWORDNUM(tclocation,1) AS INT)
>tclocation = "2010 N Main St"
>? CAST(GETWORDNUM(tclocation,1) AS INT)
>
>
>
>>>How do I convert character into integer? Please help. Thanks, Sam
>>
>>
>>lcString = "12345"
>>? CAST(lcString AS int)
>>
--sb--