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:
00113816
Vues:
21
Kamal,

That would probably work faster, however I need to return the value of "MyFunction()" to the calling procedure. Thanks though!


>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
Répondre
Fil
Voir

Click here to load this message in the networking platform