' Compare strings in array
include "$\inc\console.inc"
include "$\inc\MathMisc.inc"
indexbase 1
dim as string Lines[100]={32}
int lastline=countof lines
int length
'fill array randomly
for x=1 to lastline
length=abs(rnd()*5) +5
lines[x]=""
for l=1 to length
lines[x]&=chr(abs(rnd()*48)+60)
next l
print lines[x] cr
next x
print"Enter to continue ..." cr cr: waitkey()
lines[10]="_Sue"
lines[90]="_Tom"
for x=1 to LastLine
// if (lines[x]="_Tom") or (lines[x]="_Sue") then 'does not work
if len(lines[x])=4 and (instr("_Tom", lines[x]) or instr("_Sue", lines[x])) then
print lines[x] " found in line " x " ... Enter" cr: waitkey()
else
lines[x] = "Line " x " = " lines[x] : print lines[x] " ok " cr
end if
next x
print "Enter to end ..."
waitkey()