---
url: >-
  /statelake/scripting-reference/functions-and-procedures/string-functions/soundex-functions/soundexproc.md
---

# SoundexProc

**SoundexProc** indicates whether the two strings **AText** and **AOther** are similar, by returning the boolean value **True** are similar, and **False** if the two strings are not sufficiently similar.

SoundexSimilar uses a **Soundex** algorithm to convert both strings into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then compares the first four (4) characters in the resulting representation, returning **True** if they are all the same and **False** if they are not.

For the ability to compare up to 8 characters in the resulting phonetic representation of each string, please refer to the similar function [SoundexSimilar](/statelake/scripting-reference/functions-and-procedures/string-functions/soundex-functions/soundexsimilar). The greater number of characters compared, the more precision.

**Declaration**: Function SoundexProc( const AText, AOther : string) : Boolean;

The following examples show misses and matches.

```pascal
procedure ScriptEvent (var Value : variant);
var sConfYN : boolean;
begin
  LogInfo('');
  LogInfo('');
  sConfYN := SoundexProc('Merryweather', 'Marywether');
  LogInfo('Merryweather + Marywether');
 If sConfYN = true then
    LogInfo('The strings are silimar.')
 else
    LogInfo('The strings are NOT similar.');

  sConfYN := SoundexProc('Laurel', 'Hardy');
  LogInfo('Laurel + Hardy');
 If sConfYN = true then
    LogInfo('The strings are silimar.')
 else
    LogInfo('The strings are NOT similar.');

  sConfYN := SoundexProc('Powers', 'Park');
  LogInfo('Powers + Park');
 If sConfYN = true then
    LogInfo('The strings are silimar.')
 else
    LogInfo('The strings are NOT similar.');

  sConfYN := SoundexProc('Tomson', 'Thomson');
  LogInfo('Tomson + Thomson');
 If sConfYN = true then
    LogInfo('The strings are silimar.')
 else
    LogInfo('The strings are NOT similar.');

  sConfYN := SoundexProc('SLEIGH', 'SLAY');
  LogInfo('SLEIGH + SLAY');
 If sConfYN = true then
    LogInfo('The strings are silimar.')
 else
    LogInfo('The strings are NOT similar.');

  sConfYN := SoundexSimilar('ruby', 'roobie',8);
  LogInfo('ruby + roobie');
 If sConfYN = true then
    LogInfo('The strings are silimar.')
 else
    LogInfo('The strings are NOT similar.');
  LogInfo('');
end;
```
