Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number conversion
Message
From
27/06/2011 00:19:08
 
 
To
21/06/2011 13:55:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01514858
Message ID:
01516184
Views:
157
Sorry for the slow reply, Charles -- I've been away....
In same vein as you: I wasn't suggesting it as the best solution -- just as another way to do what he was asking.

>I actually just jumped into the thread at that point, never read other answers and didn't even think of it in terms of best solution. Just thought it was novel and was intrigued that it took me a minute to get what was going on. <g>
>
>
>>I thought Sergey's was best and probably most stable,
>>although I don't know if/how much icase()-perf
>>degenerates for the cases at the end.
>>Pretty sure it is better than the string-massage
>>
>>my 0.001 €
>>
>>thomas
>>
>>
>>>Took me a second to get what you were doing but I have to say that is very clever. Just plain cool.
>>>
>>>>>Dear All,
>>>>>I know it sounds crazy but how can make a conversion such as this one
>>>>>instead of typing the following will it be possible to do it in a loop
>>>>>Thanks to all
>>>>>
>>>>>
>>>>>If  fieldz  =7  replace fieldz  WITH 97  
>>>>>If  fieldz  =6  replace fieldz WITH 84  
>>>>>If  fieldz  =5  replace fieldz WITH 74  
>>>>>If  fieldz  =4  replace fieldz WITH 59 
>>>>>If  fieldz  =3  replace fieldz WITH 50  
>>>>>If  fieldz  =2  replace fieldz WITH 34  
>>>>>If  fieldz  =1  replace fieldz WITH 24
>>>>>
>>>>
>>>>IF BETWEEN(fieldz, 1, 7)
>>>> REPLACE fieldz WITH VAL(SUBSTR('24345059748497', fieldz * 2 - 1, 2) )
>>>>ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform