Information générale
Catégorie:
Codage, syntaxe et commandes
Rich,
My reasoning for the FOR clause addition is simple...
This clearly doesn't ever want to handle deleted records and putting it in the SCAN ensures that (ever) changing the SET DELETED setting will not impact this routine. It also makes it obvious to the developer whenever that routine is examined.
Cheers,
Jim N
>Ken,
>
>I'm not the one who had the problem. I just jumped in to say that I was surprised that so many people (including some acknowledged gurus) were telling the person to use SCAN FOR NOT DELETED() when he said he had DELETED ON.
>
>Thanks anyway,
>Rich.
>
>>Hiya Rich,
>>
>>I believe your record pointer is not moving off the deleted record and that is why you're seeing it. By bypassing the endscan, you're also bypassing the implied skip that goes along with it. Try putting a ? recno() in the loop and you should see what I mean. I agree with the others here that have already said that scan for not deleted() would be a better approach.
>>
>>>>Steve,
>>>> [snip]
>>>>2) I'd add a not DELETED() to the SCAN for clause
>>>
>>>I'm confused. Lots of people besides Jim have said this.
>>>
>>>If SET DELETED is ON, SCAN is already SCAN FOR NOT DELETED(). Or what am I missing?
>>>
>>>- Rich.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement