Hey, I didn't know.
Think you got enough responses to your tip? < g >
>Well ... I think we can all agree I was pretty much the only one IN THE WORLD who didn't know about this<g>.
>
>That's the trouble with working on SBT 90% of the time, I'm just not keepin' up.
>
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>THERE IS A HUGE GOTCHA WITH THIS "FEATURE"
>>
>>If, in the course of your scan loop the currently selected alias (not the alias you are SCANning) ends up on EOF(), then, when you hit the END SCAN you will exit the loop even though you are not EOF() on the actual alias you're scanning.
>>
>>ALWAYS reselect the alias you are scanning before the END SCAN
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>
>>I'd be interested in seeing the code that does that, Christian. I just tried something similar, and had no problem.
>>
>>I do have my own "gotcha" to add to the discussion, though -- when using a SCAN..ENDSCAN within another SCAN...ENDSCAN I have run into intermittent problems with restoring the alias upon the second ENDSCAN. In other words, if I nest SCAN..ENDSCAN, I do actually try to restore the alias, because FoxPro would sometimes seem "confused" by the nested SCANs.
>>
>>I haven't noticed this since 5.0 though, so I wonder if 6.0, or SP3, solved it... or maybe I just stopped coding this way so I stopped noticing!
- Jeff