Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simplify concantenated line of code
Message
 
To
17/07/2007 12:17:54
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01241143
Message ID:
01241152
Views:
20
This message has been marked as the solution to the initial question of the thread.
>How to simplify this to remove the EVALUATE() and make it more readable?
>
>
>FOR ix = 1 to Whatever
>     REPLACE JMJ_IN.Diag1 WITH LEFT(ALLTRIM(UPPER(EVALUATE('loObj'+LTRIM(STR(m.ix))+".Field019"))),AT('^',EVALUATE('loObj'+LTRIM(STR(m.ix))+".Field019"))-1)
>ENDFOR
>
FOR ix = 1 to Whatever
    WITH EVALUATE('loObj'+TRANSFORM(m.ix))
         REPLACE JMJ_IN.Diag1 WITH LEFT(ALLTRIM(UPPER(.Field019)),AT('^',.Field019)-1)
    ENDWITH
ENDFOR
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform