Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is SEEK faster than GOTO?
Message
From
07/06/2004 18:28:32
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00910871
Message ID:
00910949
Views:
23
>I have a function that needs to move around a dbf and then return to the record where the call was made. Should I seek my way back or is a GOTO okay?
>Thanks

Consider the following. For a SEEK, VFP must first find out the correct record number, by analyzing the index, and then, internally, do the equivalent of GOTO record-number.

However, since SEEK is fairly quick, too, I would mainly base my decision on the convenience. For the purpose of going back to a particular record, GOTO may win too, since you don't need to SET ORDER to a particular index first.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform