Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan / Endscan and processing logic
Message
 
 
To
04/07/2006 11:22:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01127322
Message ID:
01133629
Views:
19
>>In other words, I needed to create a file for each different client and each different carrier. If I'm using scan/endscan, I have to repeat the code after the scan to create file for the last set of client/carrier. Originally I added a check in scan itself and was surpised, that my eof() or reccount() = recno() didn't work. But then I realized, that my logic dictates one additional loop, that I was able to achieve with for loop.
>
>You could create a function to do that
>
>local oldKey
>OldKey = null
>
>scan all for .... while ....
>
> if( !isnull(OldKey) and (OldKey <> NewKey) )
>      =makeTheFile()
> endif
> OldKey = NewKey
>
>endscan
>
>if( !isnull(OldKey() )
>     =makeTheFile()
>endif
>
It's not that easy, I thought about it. I think my own solution is much simpler.
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