Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Tally and timers
Message
De
11/03/2006 15:29:49
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01102133
Message ID:
01103461
Vues:
18
>Peter,
>
>Whether or not any particular piece of code illustrates a problem or not doesn't really matter.
>
>An interrupt handler must save/restore the state of any global item it changes during its execution.

Well, this save/restore philosophy should then not only apply to interrupt handlers, but also to functions and procedures, right?

Okay, let's go extreme then. Should it also apply to every piece of code that changes _tally? In other words, should _tally be restored every time that e.g. a select-sql is done? Like
oldTally = _tally
select [somefield] from [sometable] into [somecursor]
lnTally = _tally
_tally = oldTally
I think not many here would agree to this harsh regime of restoring _tally. Why? Because _tally's value is - as we all should know - valid only for a short period of time, that is, during some lines only. Knowing that, why on earth would we have to restore this _tally (I'm not debating the setting of SET DELETED here) before returning?! There should be no reason for this under normal situations. Consequently, in the case of _tally I disagree with your POV.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform