Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intellisense in WITH ... ENDWITH
Message
From
07/09/2012 11:22:54
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
07/09/2012 07:02:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01550535
Message ID:
01552564
Views:
87
>>>The end of this is a simple
>>>
scatter name oSomething memo
>>>with oSomething
>>>   nErrorCount=myBigValidationFn()
>>>endwith
>>>which then works nicely even in a scan/end loop, and I don't even care who called it, from where, and what was the alias. And it's very fast.
>>
>>Hi Dragan
>>
>>I'd have created a memvar and passed it to the rules as a parameter. If each had the parameter from the start you would not have any gain from the with construct. What will you do if you needed nested WITH? It's a best practice to send parameters to a function to encapsulate it. This approach is not one that shows any advantage to WITH. :)
>
>And the cost of passing a parameter and parsing its properties 30000 times vs properties being accessed in the WITH context? Consider that this has to happen in real time, i.e. between a click and the time the user expects to see some results.

Passed by reference, is it any worse than the WITH? Certainly more obvious what object is being acted upon? :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform