Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RECNO_OF_INDEX()

Status
Not open for further replies.

foxmuldr3

Programmer
Jul 19, 2012
166
US
If we use RECNO() we get the record number of the row in the table. Is there an equivalent function which gives us the record number of the current record's entry in the current index/tag?

Code:
RECNO  cField
  1    ZEBRA
  2    HIPPO
  3    DOVE

INDEX ON cField TAG MAIN

Code:
ENTRY RECNO  cField
  1     3    DOVE
  2     2    HIPPO
  3     1    ZEBRA

Looking for a way to obtain the index ENTRY number for any given RECNO in the table.

Thank you! :)

Best regards,
Rick C. Hodgin
 
Olaf,

The trailing apostrophe on proper names ending with an "s" is correct in English at times. "I pray this in Jesus' name," but we would also say "We went to Thomas's house," and some people say "I pray this in Jesus's name" as well.

The apostrophe in names indicates a possessiveness. In other cases it's a contraction where letters or words are removed / replaced:

I won't do that ... I will not do that.
I can't do that ... I cannot do that.
It's a good day ... it is a good day.
'Twas the night before Christmas ... It was the night before Christmas.
We went to Bill's house ... We went to Bill is house.
LOL! Just kidding on the last one. :)

I didn't know English wasn't your first language until I saw you on Google+. To be honest, I was actually kind of surprised.

Best regards,
Rick C. Hodgin
 
Olaf,

It's not strictly true that its is an exception. In the case of nouns, the possessive always has an apostrophe. So your example "Mike's post" is correct. But that doesn't apply to pronouns. In those cases, the possessive is a distinct word in its own:

I -> My
You -> Your
We -> Our

and so on. It -> Its falls into that category.

Rick, you mentioned the question of an apostrophe after a name that ends with S: "I pray this in Jesus' name," as opposed to "We went to Thomas's house." I've never been sure about this, so I've always used whichever form seems to me to sound better. So, I might say "Jeff Bridges' father was also an actor", and "Adams' girlfriend was called Eve". But I would say "Mike Lewis's posts", for example.

It would be nice to know if there is a definite rule for this.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike,

There is no formal rule other than the "what sounds best" guideline. However, there is a "preferred" state, which is:

"Although names ending in s or an s sound are not required to have the second s added in possessive form, it is preferred."

Per
Geeks. :)

Best regards,
Rick C. Hodgin
 
No problem. I'm happy to come to either Mike Lewis' aid, or Mike Lewis's aid, though I do prefer the latter. :) LOL!

Best regards,
Rick C. Hodgin
 
>I -> My
>You -> Your
>We -> Our
>
>and so on. It -> Its falls into that category.

Very good! That makes it easier to remember as her,his,its.

Bye, Olaf.

 
I was reading this and I couldn't help myself. I just had to add:
You're sitting in your chair there, and they're sitting in their chair over there.
So many get those confused.

As for the original post, my two cents. The way I understood VFP indexes worked in the original .IDX files was a simple binary search of the written key values. There was no sort of reverse lookup for the table values.
.CDXs on the other hand are fairly mysterious since their Rushmore technology was so secretive. It may be next to impossible to find any sort of documentation, and quite challenging to find out what data is written when they're updated.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
DSummZZZ,

I appreciate your post. If one looks inside the CDX using a hex editor, they'll quickly discover that it's not easier. CDX formats are far more complex than IDX files, which are actually very simple as you say.

I plan to support CDX files for one-time read-only mode, whereby they are parsed out to multiple .IDX (or .FDX) files (one for each tag) using the format:

Code:
USE table
**********
* TABLE.DBF has an associated TABLE.CDX with four tags:
*  main, uid, name, number
*****
* Will create at the same location as the .CDX either .IDX or .FDX files:
*  table_main.idx
*  table_uid.idx
*  table_name.idx
*  table_number.idx
*****
* The .IDX file format will be used if index conditions are
* compatible, otherwise .FDX will be.
*****
 
GriffMG said:
At school we're given a rule: I before E, except after C, which is supposed to help people spell... except there are, perhaps, as many exceptions as words that follow the 'rule'

"I before E, except after C", is supposed to be used only for the long 'ee' sound.
believe, retrieve
receipt, deceive, receive

It's not supposed to apply to the 'eye/aye' sounds.
height, neighbour

There are still exceptions:
either, neither (although they can also be pronounced with as 'eye')
 
"I before E, except after C", is supposed to be used only for the long 'ee' sound.
believe, retrieve
receipt, deceive, receive

It's not supposed to apply to the 'eye/aye' sounds.
height, neighbour

Which is why the full saying "I before E, except after C, or when sounding like A, as in 'neighbor' or 'weigh'."

Tamar
 
Tamar I think the full saying is more accurately:

[bold]
"I before E, except when it isn't"
[/bold]

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top