It is a good known behaviour of '<>' operator and it is related to the current EXACTSETting.
Please take a look for the following explanation from Clipper documentation:
<> != # Not equal--binary
Syntax
<exp1> <> <exp2>
<exp1> != <exp2>
<exp1> # <exp2>
Type
Character, date, logical, memo, NIL, numeric
Operands
<exp1> and <exp2> are expressions of the same data type or NIL
to compare for inequality.
Description
The <> (not equal) is a binary operator that compares two values of the
same data type and returns true (.T.) if <exp1> is not equal to <exp2>
according to the following rules:
- Character: The comparison is based on the underlying ASCII
code and is the inverse of the equal operator (=). This means that
the comparison is sensitive to the current EXACT SETting. See the
examples below.
- Date: Dates are compared according to the underlying date
value.
- Logical: False (.F.) is not equal to true (.T.).
- Memo: Treated the same as character.
- NIL: All values compared to NIL other than NIL return true (.T.).
- Numeric: Compared based on magnitude.
Examples
- These examples illustrate how the not equal operator (<>)
behaves with different data types: