>I have a process that uses an IVR system to access acount information. Since consumers use their phones to access their accounts, I convert their names to a numeric character value. I use character instead of numerics because of international zip codes that use characters in their zip codes. I use a series of case statements that evaulate each letter sent, using the '$' function.
>Code sample:
>
> CASE lcthischar $ 'A,B,C,2'
> lcnewchar = '2'
>
>So if the character being evaluated is a 'B', it returns a character 2. I am attempting to optimize this conversion, but I have yet to come up with anything that works quicker.
>Any ideas?
I don't have a FPW reference handy, but in VFP, CHRTRANC() is faster and cleaner code. The following is an example:
cTransFrom='ABCDEFGHIJKLMNO'
cTransTo='222333444555666'
? CHRTRANC('BEGIN',cTransFrom,cTransTo)