Bt_ACompare() Function
<< Click to Display Table of Contents >>
Bt_ACompare() Function
|
|
Purpose
Compare values in 2 arrays.
Prototype
FUNCTION Bt_ACompare ( aValues AS ARRAY, aCrit AS ARRAY, nDirection AS LONG, aDesc AS ARRAY ) AS LOGIC
Argument(s)
aValues | ARRAY (Field) values to check |
aCrit | ARRAY (Scope) values to check against |
nDirection | LONG How to compare the values: |
< 0 aValues must be Less or Equal to aCrit |
> 0 aValues must be Greater or Equal to aCrit |
= 0 aValues must be equal to aCrit |
aDesc | ARRAY Array of flags that indicate whether to compare for Descending index (True) or Ascending index (FALSE) |
Return
LOGIC TRUE when the values match
Description
This function is used internally (in the record movement methods) to check the current record against the active scope
The size of aCrit determines how many elements of the aValues array will be compared
Example(s)
aValues := SELF:OrderKeyValue(SELF:nOrder)
IF ! Bt_ACompare(aValues, oIndex:aScopeBot ,-1)
// If not Current record <= Bottom Scope
lOk := FALSE
SELF:lEOF := TRUE
ENDIF