Hi barney
There _IS_ a difference between !$var==[somevalue] and $var<>[somevalue].
In '<>' the characters are compared up to the length of the right character string, e.g.
"A" <> "Z" // result: TRUE
"A" <> "A " // result: TRUE
"A " <> "A" // result: FALSE (means they are equal)
"" <> "A" // result: TRUE
'==' returns TRUE only when both character strings contain exactly the same characters, so a ! (NOT) before it will return TRUE when not exactly same e.g.
! "A" == "A" // result: FALSE
! "A" == "A " // result: TRUE
! "A " == "A" // result: TRUE
! "" == "A" // result: TRUE
! "AB" == "ABC" // result: TRUE
! "ABC" == "ABC" // result: FALSE
In short use '<>' if you do not want exact comparison, but just left most ones, e.g.
MPT <> "P" // where MPT has "P1" value, so this will return FALSE, and similarly,
! LEFT(MPT,1) == "P" // where MPT has "P1" value, so this will return FALSE
Hope I was able to help you a bit in fixing your old codes
Regards,
Anand