tr(2).srt = DateTime.Now
For i=0 To ScrList.Size-1 ' for each list word
If (i Mod 1000 = 0) Then ' update progressbar
k = 2 + 98 * (i/ScrList.Size)
pbrPB1.Progress = k
End If
DoEvents
If (fSrchCancel = True) Then
PgShow = 0
pnlSwap(pnlMain, pnlMain)
Return
End If
s = ScrList.Get(i)
s = s.ToUpperCase
l = s.Length
tr(3).srt = DateTime.Now
For j=0 To l2-1 ' for each let match check if it has remainder
ts = s ' temp word
p1 = ts.IndexOf(s2.CharAt(j))
If (p1 >= 0) Then
ts = RemLet(ts, p1) ' remove first occurrence of let form word
Else
Continue ' try next let. word must have let
End If
fmtch = True
ts1 = s1 ' temp letters
tr(4).srt = DateTime.Now
For k=0 To ts.Length-1 ' check if each let of temp word is in letters
p1 = ts1.IndexOf(ts.CharAt(k))
If (p1 >= 0) Then
RemLet(ts1, p1) ' letter used in match
Else
fmtch = False
Exit ' word let not in letters
End If
Next
tr(4).end = DateTime.Now
tr(4).tot = tr(4).tot + (tr(4).end - tr(4).srt)
If (fmtch = True) Then ' add word to results table
v(0) = ScrList.Get(i)
v(1) = ScoreWord(v(0))
v(2) = v(0).Length
SQL1.ExecNonQuery2("INSERT INTO restmp (mword, mscore, mlen) VALUES (?, ?, ?)", v)
End If
Next
tr(3).end = DateTime.Now
tr(3).tot = tr(3).tot + (tr(3).end - tr(3).srt)
Next ' next word
tr(2).tot = DateTime.Now - tr(2).srt
Log("*** tr2 = " & tr(2).tot)
Log("*** tr3 = " & tr(3).tot)
Log("*** tr4 = " & tr(4).tot)
End If