Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
SEEKs that don't match.
Does anyone know how to do the equivalent of a SEEK which if there is no match places the record pointer to the position where that value would go (under the current index of course)?
Here's an example. Take the following single field indexed table:
AA
AB
BG
GG
If I do a SEEK "AC", the record pointer will go to EOF since there is no record containing "AC". But what I want is for it to go to the record containing "BG" since that is where one would find "AC" in the file if it existed.
Am I making myself clear? I hope so. I wrote a routine that implements a binary search, but that is pretty slow since it had to use a lot of SKIP statements (and "SKIP 12567" does not execute instantly!). I'm just hoping that there is a command that I missed.
It is not a completely necessary feature for my app, but I thought it would be helpful for users who may not know exactly how to spell what they are typing.
Thanks. And Happy New Year.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement