Terry,
I know this reply is a bit late in the thread but I wanted to document the comparison process completely in this thread for others to get down.
SET EXACT ON
Causes if the shorter string in a comparison to be padded with spaces to be equal in lenght to the longer string.
Two strings are compared by the = sign character for character until the string on the right of the = is exhausted, so;
"Jimmy" = "Jim" is True
"Jim" = "Jimmy" is False
The double equal sign == adds one more step to the comparison process, after the above comparison is complete the two strings are compared for length.
"Jimmy" == "Jim" is False
"Jim" == "Jimmy" is False
Many erroneously assume that SET EXACT ON and == are the same, they are NOT as you can see below;
lcStr1 = "Jim "
lcStr2 = "Jim"
SET EXACT OFF
?lcStr1 = lcStr2 && .T.
?lcStr1 == lcStr2 && .F.
SET EXACT ON
?lcStr1 = lcStr2 && .T.
?lcStr1 == lcStr2 && .F.