Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Argument starter - The roots of all evil
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00938079
Message ID:
00940523
Views:
42
>Terry,
>
>I'm disappointed! :-)
>
>Rather than a FOR loop, if you're searching an ordered array or list, a DO WHILE construct for a binary search is faster than a sequenctial search. That's what both a FOR loop or ASCAN() would use.

George

I'm so sorry :-C. I guess I did commit that message b4 reading your argument (it was yours, wasn't it?) that the time differences don't add up to a hill of beans. And then I said only if a huge list that would take seconds rather than fractions thereof. I'm, of course, interested in what you just said. What exactly do you mean by "binary search"? As I learnt it in college it means going backward and foreward in the list, halving the distance as you go (in essence). If that's so, please could you indicate how does ascan() do it, and how you would do it via a do while?

Cheers

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform