Word wheel: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,264: | Line 1,264: | ||
End Function |
End Function |
||
Sub show(g As String,file As String,byref matches as long) |
Sub show(g As String,file As String,byref matches as long,minsize as long) |
||
Redim As String s() |
Redim As String s() |
||
Var L=loadfile(file) |
Var L=loadfile(file) |
||
string_split(L,Chr(10),s()) |
string_split(L,Chr(10),s()) |
||
For m As Long= |
For m As Long=minsize To len(g) |
||
For n As Long=Lbound(s) To Ubound(s) |
For n As Long=Lbound(s) To Ubound(s) |
||
If Len(s(n))=m Then |
If Len(s(n))=m Then |
||
Line 1,289: | Line 1,289: | ||
dim as long matches |
dim as long matches |
||
dim as double t=timer |
dim as double t=timer |
||
show("ndeokgelw","unixdict.txt",matches) |
show("ndeokgelw","unixdict.txt",matches,3) |
||
print |
print |
||
print "Overall time taken ";timer-t;" seconds" |
print "Overall time taken ";timer-t;" seconds" |
||
Line 1,318: | Line 1,318: | ||
17 matches |
17 matches |
||
</pre> |
</pre> |
||
=={{header|Go}}== |
=={{header|Go}}== |