Equinox Online Help - Language Reference - A to Z
Compare |
|
---|---|
Applies to | |
Syntax | Compare(String1Expression, String2Expression) |
Action | [Function] Returns an indication of the similarity between two strings. |
Scope | Usable anywhere |
Notes | This function compares the arguments (String1Expression and String2Expression) and returns a numeric value indicating the degree of similarity between them. A return value of 100 indicates that the strings are identical and a return value of zero indicates that the arguments are completely dissimilar. |
Category | String handling |
See Also | ChrList, Chrs, Fill, IsNumber, Left_Function, Len, Match, Maxlen, Mid_Function, Remove, Replace, Right_Function], Search_SearchNext, SetLen, SetMaxLen, SortOrder, SubstituteData |
Example | In the following example, a criminal's surname (held in the current record) is compared with the name of a suspect. If they are similar, the record is marked in the NewSuspect index. if Compare(surname, suspect) > 85 thenMarkIndex NewSuspectend if |