Difference between revisions of "DIFFERENCE()"
From Lianjapedia
m (Text replace - "Recital" to "Lianja") |
Helen.george (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return an integer signifying the phonetic difference between two character strings | Function to return an integer signifying the phonetic difference between two character strings | ||
− | |||
==Syntax== | ==Syntax== | ||
DIFFERENCE(<expC1>,<expC2>) | DIFFERENCE(<expC1>,<expC2>) | ||
− | |||
==See Also== | ==See Also== | ||
[[SOUNDEX()]] | [[SOUNDEX()]] | ||
− | |||
==Description== | ==Description== | ||
The DIFFERENCE() function returns an integer signifying the phonetic difference between two character strings. The DIFFERENCE() converts the specified character expressions, <expC1> and <expC2> into SOUNDEX codes and calculates the phonetic difference between the two. The DIFFERENCE() function returns an integer between 0 and 4. A return value of 4 represents a close match, and 0 is returned when the two character expression have no letters in common. The DIFFERENCE() function returns a 1 when the two expressions have one letter in common. | The DIFFERENCE() function returns an integer signifying the phonetic difference between two character strings. The DIFFERENCE() converts the specified character expressions, <expC1> and <expC2> into SOUNDEX codes and calculates the phonetic difference between the two. The DIFFERENCE() function returns an integer between 0 and 4. A return value of 4 represents a close match, and 0 is returned when the two character expression have no letters in common. The DIFFERENCE() function returns a 1 when the two expressions have one letter in common. | ||
− | |||
==Example== | ==Example== | ||
Line 34: | Line 30: | ||
do sound_like | do sound_like | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== |
Revision as of 11:54, 11 December 2012
Purpose
Function to return an integer signifying the phonetic difference between two character strings
Syntax
DIFFERENCE(<expC1>,<expC2>)
See Also
Description
The DIFFERENCE() function returns an integer signifying the phonetic difference between two character strings. The DIFFERENCE() converts the specified character expressions, <expC1> and <expC2> into SOUNDEX codes and calculates the phonetic difference between the two. The DIFFERENCE() function returns an integer between 0 and 4. A return value of 4 represents a close match, and 0 is returned when the two character expression have no letters in common. The DIFFERENCE() function returns a 1 when the two expressions have one letter in common.
Example
procedure sound_like dialog get sound; label "SPELL SEARCH"; help "Enter a name" menu browse name; for difference(name,sound) >= 2; label "Phonetically Matching Names"; quit clear if not empty(menuitem()) seek menuitem() edit endif return use customer do sound_like
Products
Lianja Server, Lianja