Functions.Difference Method |  |
-- todo --
Returns an integer, 0 through 4, which represents the relative phonetic difference between two character expressions.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.18
Syntax FUNCTION Difference(
cExpression1,
cExpression2
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static Usual Difference(
Usual cExpression1 = default,
Usual cExpression2 = default
)
Request Example
View SourceParameters
- cExpression1 (Optional)
- Type: Usual
Specifies the character expressions that DIFFERENCE( ) compares. - cExpression2 (Optional)
- Type: Usual
Specifies the character expressions that DIFFERENCE( ) compares.
Return Value
Type:
Usual
Numeric
Remarks
Difference( ) is useful for searching tables when the exact spelling of an entry isn't known.
The more alike the two expressions are spelled, the higher the number Difference( ) returns.
If the character expressions are spelled very similarly, Difference( ) returns 4. For two character expressions with little in common phonetically,
Difference( ) returns 0.
Examples1STORE 'Smith' TO gcName1
2STORE 'Smythe' TO gcName2
3STORE 'Smittie' TO gcName3
4STORE '' TO gcName4
5Clear
6? Difference(gcName1, gcName2)
7? Difference(gcName1, gcName3)
8? Difference(gcName1, gcName4)
See Also