After finding the highest:
doorsills 246
oxytone 236
spoonbills 266
toolroom 246
I looked for any that scored higher than 230:
buzzers azaz 234
doorsills azaz 246
foothills azaz 232
mortally azaz 232
oxysome azza 232
oxytone azza 236
poolroom zaza 238
rollmops zaaz 240
spoonbills zaaz 266
toolroom zaza 246
trollers zaaz 238
trollops zaaz 254
wolfberry zaaz 248
wrongers zaaz 238
DefDbl A-Z
Dim alpha$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
alpha$ = "abcdefghijklmnopqrstuvwxyz"
azazScore = 0
azzaScore = 0
zaazScore = 0
zazaScore = 0
Open "c:\words\words.txt" For Input As #1
Do
Line Input #1, w$
If Len(w) > 1 And w = LCase(w) Then
baseScore = sumChars(w)
For end1 = 1 To Len(w) - 1
w1$ = Left(w, end1): w2$ = Mid(w, end1 + 1)
If ascend(w1) And ascend(w2) Then
score = baseScore
If isWord(w1) And isWord(w2) Then score = 2 * score
If score > azazScore Then azazScore = score: azazWord$ = w$
If score > 230 Then Text1.Text = Text1.Text & w$ & " azaz" & " " & score & vbCrLf
End If
If ascend(w1) And descend(w2) Then
score = baseScore
If isWord(w1) And isWord(w2) Then score = 2 * score
If score > azzaScore Then azzaScore = score: azzaWord$ = w$
If score > 230 Then Text1.Text = Text1.Text & w$ & " azza" & " " & score & vbCrLf
End If
If descend(w1) And ascend(w2) Then
score = baseScore
If isWord(w1) And isWord(w2) Then score = 2 * score
If score > zaazScore Then zaazScore = score: zaazWord$ = w$
If score > 230 Then Text1.Text = Text1.Text & w$ & " zaaz" & " " & score & vbCrLf
End If
If descend(w1) And descend(w2) Then
score = baseScore
If isWord(w1) And isWord(w2) Then score = 2 * score
If score > zazaScore Then zazaScore = score: zazaWord$ = w$
If score > 230 Then Text1.Text = Text1.Text & w$ & " zaza" & " " & score & vbCrLf
End If
Next
End If
DoEvents
Loop Until EOF(1)
Text1.Text = Text1.Text & vbCrLf
Text1.Text = Text1.Text & azazWord & " " & azazScore & vbCrLf
Text1.Text = Text1.Text & azzaWord & " " & azzaScore & vbCrLf
Text1.Text = Text1.Text & zaazWord & " " & zaazScore & vbCrLf
Text1.Text = Text1.Text & zazaWord & " " & zazaScore & vbCrLf
Text1.Text = Text1.Text & vbCrLf & " done"
End Sub
Function ascend(w$)
a = 1
For i = 2 To Len(w)
If Mid(w, i, 1) < Mid(w, i - 1, 1) Then a = 0: Exit For
Next
ascend = a
End Function
Function descend(w$)
d = 1
For i = 2 To Len(w)
If Mid(w, i, 1) > Mid(w, i - 1, 1) Then d = 0: Exit For
Next
descend = d
End Function
Function sumChars(w$)
s = 0
For i = 1 To Len(w)
s = s + InStr(alpha, Mid(w, i, 1))
Next
sumChars = s
End Function
Function isWord(w$)
n = Len(w$)
w1$ = Space$(n)
Open "c:\words\words" + LTrim$(Str$(n)) + ".txt" For Binary As #2
l = LOF(2) / n
low = 1: high = l
Do
middle = Int((low + high) / 2)
Get #2, (middle - 1) * n + 1, w1$
If w1$ = w$ Then isWord = 1: Close 2: Exit Function
If w1$ < w$ Then low = middle + 1 Else high = middle - 1
Loop Until low > high
isWord = 0
Close 2
End Function