General information
Category:
Coding, syntax & commands
SCAN always reselects the right work area (the one the loop started in) when it reaches ENDSCAN, so you don't need to reselect even if you've changed work areas inside the loop. We know a lot of people who do so anyway. There doesn't appear to be a performance penalty for this, so if you're the belt-and-suspenders type, go right ahead.
FYI - I got this from The Hacker's Guide to Visual Foxpro 6 by Tamara Granor and Ed Roche. Per their experience there doesn't seem to be a performance hit by SELECTing the area again.... In fact, even though the SCAN/ENDSCAN will automatically move the pointer in the correct area, I would still re-select the area prior to the ENDSCAN line for readability/ease of understanding logic flow for readers of the code. Just personal pref..
Bill
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only