Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New VFP feature I didn't know about. Did you?
Message
 
 
To
21/07/2000 14:03:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00395202
Message ID:
00395621
Views:
9
Oops. Sorry, Rick. I got a little confused there. While my critique of your code is correct, if I had payed attention and saw that you were disproving Christian's gotcha, I would have congratulated you on correctly doing so. Actually, I should have just stayed silent.

>I just tried this program in FP 2.0 and it runs fine to expected completion, and I get a "Not Found: ..." for each and every record.
>
>close all
>select 0
>use gameinfo
>select 0
>use gamemask
>select gameinfo
>scan
> ? name
> select gamemask
> ** force an eof (all fields are uppercase)
> locate for gamemask.abbrv = "xxx" && gameinfo.abbrv
> IF eof() && !found()
> ? "Not Found: "+gameinfo.abbrv
> ENDIF
>
>endscan
>
>
>>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
>>
>>
>>>Well I can't check 1.x, but it works that way in FP 2.0!
>>>
><snip>
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform