Page 1 of 1

harbour operators

Posted: Thu Aug 14, 2025 12:11 pm
by wartiaga
Hello,

I have a question about operators in harbour, specifically <>. In a variable a="TEST" and in a variable b="TEST1", when testing a <> b, it returns true. How should I proceed? Thank you.

Re: harbour operators

Posted: Thu Aug 14, 2025 12:22 pm
by Antonio Linares
Try with

! a == b

Re: harbour operators

Posted: Thu Aug 14, 2025 6:32 pm
by wartiaga
Antonio Linares wrote: Thu Aug 14, 2025 12:22 pm Try with

! a == b
Gracias Antonio!

Re: harbour operators

Posted: Thu Aug 14, 2025 7:10 pm
by Enrico Maria Giordano
a = b with a and b of C type means "a starts with b":

Code: Select all | Expand

"Test" = "T" --> .T.
"Test" = "A" --> .F.

"Test" == "T" --> .F.
"Test" == "Test" --> .T.