SET EXACT Command Determines String Comparison Method

ID: Q89673

The information in this article applies to:

The SET EXACT command specifies the method used to compare strings.

When EXACT is on, the compared strings must be the same length and contain the same characters in order to be considered equal. Using the == relational operator gives the same results as SET EXACT ON.

If EXACT is set to OFF and one string contains a prefix of the other string, the strings are considered equal. The two strings are compared until the string on the right side of the expression is exhausted. If the compared characters match, the strings are considered equal.

For example, SET EXACT ON gives the following string comparisons:

    'randy' = 'ran'     .F.
    'ran' = 'randy'     .F.

SET EXACT OFF gives the following string comparisons:

    'randy' = 'ran'     .T.
    'ran' = 'randy'     .F.

Additional reference words: FoxDos 2.00 2.10 2.50 2.50a KBCategory: kbusage kbprg KBSubcategory:

Last Reviewed: April 17, 1995