Oh that looks pretty nice and efficient, way to use that tab char!
OK I was testing that function and it found another definition for CAT:
So it found cat somewhere else in Collins.txt???
I verified the Collins def of CAT as 'to vomit' so how are we finding this new definition?
Also mouse looked different.
OK I was testing that function and it found another definition for CAT:
Code: (Select All)
Dim Shared words As String
words = _ReadFile$("Collins.txt")
Do
Input "Enter word to lookup "; lookup$
result$ = FindWord$(lookup$)
If result$ = "" Then Print lookup$; " Not Found." Else Print result$
Print
Loop Until lookup$ = ""
Function FindWord$ (wrd$) ' thanks mdijkens
fpos& = InStr(words, UCase$(wrd$) + Chr$(9))
If fpos& > 0 Then
fpos& = fpos& + Len(wrd$) + 1
eol& = InStr(fpos&, words, Chr$(13))
FindWord$ = Mid$(words, fpos&, eol& - fpos&)
End If
End Function
So it found cat somewhere else in Collins.txt???
I verified the Collins def of CAT as 'to vomit' so how are we finding this new definition?
Also mouse looked different.
b = b + ...