Returns an integer, 0 through 4, which represents the relative phonetic difference between two character expressions.
DIFFERENCE(cExpression1, cExpression2) |
Parameters
- cExpression1, cExpression2
- Specifies the character expressions that DIFFERENCE(В ) compares.
Return Value
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.
Example
В | Copy Code |
---|---|
STORE 'Smith' TO gcName1 STORE 'Smythe' TO gcName2 STORE 'Smittie' TO gcName3 STORE '' TO gcName4 CLEAR ? DIFFERENCE(gcName1, gcName2) && Displays 4 ? DIFFERENCE(gcName1, gcName3) && Displays 4 ? DIFFERENCE(gcName1, gcName4) && Displays 1 |