Information générale
Catégorie:
Codage, syntaxe et commandes
Vlad,
So they were giving you a way to bypass the 'natural' way of doing things if it was useful to you. You call this "optimization"???
You know, when I started programming there was *only* sequential reading available. Once we got direct access, we did *not* all go around claiming that our programming was now "optimized". The manufacturer did *not* go around claiming that they had "optimized" their system(s).
When you have misplaced something and decide on a list of places to look for it, do you go to *all* those places even though you found the thing on the third of 10 places??? Of course not! You didn't "optimize" your search, you just smartly stopped once there was no value in continuing.
What are the odds that your Pascal had a default of disabled for the complete evaluation - excellent, I should think. And if it was not so, then it like was mainly to cover the bases - to make sure no one who might have needed otherwise got hurt by a 'poor' choice of defaults.>I beg to differ here. Pascal (one of the best languages I've seen, MHO) had a compiler directive that enabled/disabled complete evaluation for logical expressions. This was very handy sometimes.
Jim N
>
>Vlad
>
>>Come on now...it would be ridiculous for VFP or any other language to continue beyond the OR! This is *not* optimization, it is just the way sensible programming works! Do you think (or expect) that all CASEs of a CASE structure are evaluated beyond the one which 'triggers'? Using your logic most compilers would and those that did not would be credited as having an optimizer!
>>
>>Give this just a little bit of thought, will you. *Anything* beyond your 'OR', no matter what it is or how long it is or how many parenthesis it might have, cannot affect the result. To call observance of this fact 'optimization' is to look for crediting VFP with something that just isn't so. It *would* be poorly done if it did anything else!
>>
>>Jim N
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