Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a find file routine
Message
 
 
To
08/06/2006 20:44:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01125737
Message ID:
01128037
Views:
23
This message has been marked as a message which has helped to the initial question of the thread.
>Tracy
>I finally had time to go through search routines sent from several responders and found that the third example you sent best suits my needs. I find the routine does generate an error however in the following code:
>
>   loFiler.find(0) && Perform search
>   if m.halt or lastkey()=27 && Escape was pressed
>      exit
>   endif
>
>The error occurs on the EXIT command. It is not valid unless contained within a of repetition structure. Perhaps I am not seeing something in the code I should. My fix is below:
>
>   if m.halt or lastkey()= 27 && Escape was pressed
>      stopSrch = .T.   && added 6/3/06, next 2
>      ***exit  && fails, not in loop
>   endif
>
>I then have code to check the value of stopSrch and respond accordingly
>
>Once again, thanks

Hi Vince,

AFAIK this was my version of the code. If I recall correctly, I used a loop through drives. But you're right, if I pass drive letter, I probably should not use Exit command.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform