Returns an integer, 0 through 4, which represents the relative phonetic difference between two character expressions.
- cExpression1, cExpression2
- Specifies the character expressions that DIFFERENCE(В ) compares.
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.
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