Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simplify concantenated line of code
Message
 
To
17/07/2007 12:28:21
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01241143
Message ID:
01241173
Views:
25
>>>
>>>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
>>>
>
>Personally, I'm scared to death of WITH...ENDWITH
>
>http://fox.wikis.com/wc.dll?Wiki~WithLeaksLocals~VFP

Yep,
When you use some functions or any other EXTERNAL to WITH...ENDWITH could be dangerous, but with simple REPLACE?
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