Command SET EXACT Foundation
Sets whether comparison of character strings will be exact.
SET EXACT on | OFF | <lToggle>
The command SET EXACT exists only for compatibility reasons and should no longer be used. The command SET LEXICAL is better suited when approximate comparisons are to be performed between character strings.
SET EXACT defines the rules for comparisons of two character strings using the comparison operators (=, >, <, => and =<). When SET EXACT is set to OFF, the expression cLeftString = cRightString is evaluated according to the following rules:
When cRightString contains a null string (""), the expression returns the value .T. (true).
When cRightString contains more characters than cLeftString, the expression returns the value .F. (false).
In all other cases, the expression returns the value .T. (true) if the characters in cRightString match with the characters in cLeftString up to the length of cRightString. Otherwise, .F. (false) is returned.
When SET EXACT is set to ON, comparison of two character strings with the comparison operators (=, >, <, => and =<) returns the value .T. (true), when their characters match except for any blank spaces appearing at the end.
The exact equals operator == additionally considers any blank spaces appearing at the end when comparing character strings.
The setting SET LEXICAL ON has precedence over the setting SET EXACT ON. If lexical comparison rules are defined with SetLexRule() the strings are transformed before a comparison is made according to SET EXACT.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.