Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Things that make me go Hmmmm...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00113468
Message ID:
00113661
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform