SET EXACT Command

Specifies rules that Visual FoxPro uses when comparing two strings of different lengths.

Note

Unlike SET ANSI, SET EXACT does not apply to Visual FoxPro SQL commands. For more information, see SET ANSI Command.

SET EXACT ON | OFF

Parameters

  • ON
    Specifies that expressions must match character for character when comparing character data, or byte for byte when comparing binary data, to be equivalent.

    Note

    To match the length of the longer expression, the shorter of the two expressions is padded to the right with spaces or zero (0) bytes. However, any trailing spaces or zero bytes in the expressions are disregarded in the comparison.

  • OFF
    Specifies that expressions must match character for character when comparing character data, or byte for byte when comparing binary data, until the end of the expression on the right side is reached to be equivalent. (Default)

Remarks

If both strings are the same length, SET EXACT has no effect.

SET EXACT is scoped to the current data session.

See Also

Reference

String and Value Comparison in Visual FoxPro
SET ANSI Command
SET Command Overview
= Command

Other Resources

Commands (Visual FoxPro)
Language Reference (Visual FoxPro)