>Hello all.
>My co-worker and I have a bet that we would like for you all to help settle.
>
>When "Go MyRecordNo" is issued, is there an internal index at work to find the record?
>
>Thanks.
No, why should it? If VFP has the record number, it can go directly to the record. No need to do complicated searches for it.
The record number isn't data which is stored anywhere; it just indicates the record position. For instance, let's say (to simplify the calculations) that the table header uses up 1000 bytes, and each record uses 100 bytes.
Then, record #1 starts at position 1001, record #2 at position 1101, record #3 at position #1201, etc.
I will leave it as an exercise to figure out the general formula, but you get the idea. Visual FoxPro uses fixed-length records, and therefore, it can find the file position immediately if it knows the record number.
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)