home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
clarion
/
library
/
soundx
/
test.cla
< prev
Wrap
Text File
|
1989-01-31
|
1KB
|
64 lines
test program
! program to test soundex function
! go 'crun test' at the DOS prompt
map
module ('soundex')
func (soundex), string
. .
screen screen window(5,55),pre(scr),hue(7,0)
OMIT('**-END-**')
╔═════════════════════════════════════════════════════╗
║ First String ■■■■■ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ Second String ■■■■■ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ Result ■■■■■■■■■■■■■■■■■■■■ ║
╚═════════════════════════════════════════════════════╝
**-END-**
row(2,2) paint(3,14),hue(8,0)
row(1,1) string('╔═{53}╗')
row(2,1) repeat(3);string('║<0{53}>║') .
row(5,1) string('╚═{53}╝')
row(2,4) string('First String')
row(3,3) string('Second String')
row(4,10) string('Result')
row(2,24) entry(@S30),use(f_string),esc(?-1),req
row(3,24) entry(@S30),use(s_string),esc(?-1),req
s1 row(2,17) string(5)
s2 row(3,17) string(5)
col(1) entry,use(?last_field)
result row(4,17) string(20)
.
f_string string (30)
s_string string (30)
code
open (screen)
loop field# = field() to fields()
accept
if field() = ?last_field then break.
.
s1"=soundex (f_string);
s2"=soundex (s_string);
scr:s1=s1"
scr:s2=s2"
if s1" <> s2"
scr:result = 'Does NOT sound alike'
else
scr:result = 'Sounds alike'
.
ask