There are seven distinct words in my unabridged dictionary:
buckskin
buckskinned
buckskins
crackskull
thickskin
thickskull
thickskulled
My VB program found them in 1 second:
Imports System
Imports System.IO
Imports System.Text
Imports System.Runtime.InteropServices
Imports System.Math
Module Module1
Sub Main()
Randomize()
Dim strstarttime As String
Dim strendtime As String
Dim strend As String
strstarttime = TimeOfDay
Console.WriteLine( _
TimeOfDay & ": Start of execution.")
lookforcksk()
Console.WriteLine("Start of execution: " & strstarttime)
strendtime = TimeOfDay
Console.WriteLine( _
TimeOfDay & ": End of execution.")
strend = "?"
Console.WriteLine(" ")
While strend <> "x"
Console.WriteLine( _
"Please enter X to exit program.")
strend = LCase(Console.ReadLine())
End While
End Sub
Sub lookforcksk()
Dim strline As String
Dim objStreamReader As StreamReader
strline = " "
objStreamReader = _
New StreamReader("C:\VBWORDLIST.MASTER")
Do While Not strline Is Nothing
strline = objStreamReader.ReadLine
strline = LCase(strline)
If strline <= " " Then
Exit Do
End If
If strline Like "*cksk*" Then
Console.WriteLine(strline)
End If
Loop
objStreamReader.Close()
End Sub
End Module
|
Posted by Penny
on 2004-09-06 09:24:27 |