Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan / Endscan and processing logic
Message
 
 
To
05/07/2006 11:58:58
Mike Yearwood
Toronto, Ontario, Canada
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:
01133878
Views:
18
>>local lcClient, lcCarrier
>>select some data into cursor to process order by Client, Carrier
>>
>>scan
>>  lcClent = client
>>  lcCarrier = carrier
>>  scan while Client == m.lcClient and Carrier = m.lcCarrier
>>    * some processing logic
>>  endscan
>>  skip -1
>>  * Create file, do some additional processing
>>endscan
>>
>>versus
>>
>>lcClient = client
>>lcCarrier = carrier
>>
>>for lnI = 1 to reccount('curProcess') + 1
>>   if Client <> m.lcClient or Carrier <> m.lcCarrier or m.lnI = reccount('curProcess') + 1
>>    ** Create file, do some additional processing
>>   else
>>     * do other processing logic
>>   endif
>>   if not eof()
>>     skip
>>   endif
>>next
>>
>>Looks like the first should win?
>
>Yes and the first is much more easily understood.

Ok, so I've switched to this approach and re-coded.

Thanks both.
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