Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RaSQL/B 6.1a for Clipper - <b>n_xseekle()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XSEEKLE()
Find key less than or equal to specified value

Syntax
N_XSEEKLE(<Segment1> [, <Segment2> ...])

Argument
See N_XSEEK() for information on specifying key values.

Returns
If an exact match is found, returns True and sets N_XFOUND() to True and  
N_XEOF() to False.  If an exact match is not found, returns False and sets 
N_XFOUND() to False and sets N_XEOF() to True if there is no record that is 
less than the specified key.  False if there is any record less than the 
specified key.

Remarks
This and other N_XSEEKxx  functions may be useful to Btrieve programmers 
accustomed to standard Btrieve GET operations. They offer more flexibility 
than the N_XSEEK() function, which attempts to impose a DBFstyle SEEK on a 
Btrieve file. They are particularly useful for complex indexes, where the 
action of N_XSEEK() can be unsatisfactory. See the Btrieve Programmer's 
Manual for additional information on the Get Less or Equal operation.

You may use this function in the library or in the RDD.  If you use it in 
the RDD, then it will set FOUND() and EOF() as well as N_XFOUND() and 
N_XEOF().

N_XSEEKLE is not affected by N_XSOFTSEEK.

Example
* Assume an index on Age.
* Retrieve the first record where Age <= 35
N_XSEEKLE(35)
IF N_XFOUND()
   * exact match found
ELSEIF .NOT. N_XEOF()
   * no records where age = 35 but
   * there are records where age < 35
ENDIF


See Also: N_XEOF() N_XFOUND() N_XSEEK() N_XSEEKEQ()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson