Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Things that make me go Hmmmm...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00113468
Message ID:
00113661
Vues:
24
Hi Michael,

I don't know how much difference would it make if the code looks like this...
SCAN WHILE YourFunction() = -1
ENDSCAN
It would be interesting to know though...

>Hello, Michael, and thank you for writing. Just by changing the ">=0" to ">-1" allowed more than a 10% increase in the program's overall speed. Thanks for the tip! I can see how it would take more internal processing.
>
>As for the WHILE vs. FOR clause, I am sticking with WHILE, since I need to focus on a certain range of records beginning at the present pointer.
>
>And, David... Thanks for telling me that SCAN with no clause defaults to the first record.
>
>This all reminds me of my assembler days, when I had to focus on how many clock cycles one instruction would use over another. I better ease off a little on my attempts for more speed, to avoid becoming nervous around stop watches.
>
>Thanks for your help!
>
>Michael Reynolds
>
>>Checking for equal to("=") is slightly faster than checking for greater than OR equal to(">=").
>>
>>Try using just the ">" on you IF command.
>>IF lnQty > -1
>> EXIT
>>ENDIF
>>
>>I'm curious to see the results.
>>
>>-Michael M. Emmons
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform