>>I another database language I use there is a powerful FOR loop...
>>
>
>lcoldstate = "$$$"
>scan for customer.country='USA'
> if lcoldstate = customer.country
> else
> if lcoldstate = "$$$"
> * do something with first record
> endif
> *break by customer.state no-lock:
> endif
>
> * do something with records
> lcoldstate = customer.country
>endscan
>* do something with last record
>
>>
>>Scan endscan sort of does this but I cannot break. Can VFP do something like this?
Shouldn't this "lcoldstate = customer.country" be "lcoldstate = customer.state"?
The last record should be last the last record in the break group not the last record of the scan.
Plus this all depends on an index being set first which may not be the case but if I have to deal with it I will.