Word wheel: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) m (→{{header|freebasic}}: fix capitalization) |
|||
Line 1,264: | Line 1,264: | ||
End Function |
End Function |
||
Sub show(g As String,file As String,byref matches as long,minsize as long) |
Sub show(g As String,file As String,byref matches as long,minsize as long,mustdo as string) |
||
Redim As String s() |
Redim As String s() |
||
Var L=loadfile(file) |
Var L=loadfile(file) |
||
Line 1,274: | Line 1,274: | ||
If Instr(g,Chr(s(n)[k]))=0 Then Goto lbl |
If Instr(g,Chr(s(n)[k]))=0 Then Goto lbl |
||
Next k |
Next k |
||
If Instr(s(n), |
If Instr(s(n),mustdo) Then |
||
For j As Long=0 To Len(s(n))-1 |
For j As Long=0 To Len(s(n))-1 |
||
If tally(s(n),Chr(s(n)[j]))>tally(g,Chr(s(n)[j])) Then Goto lbl |
If tally(s(n),Chr(s(n)[j]))>tally(g,Chr(s(n)[j])) Then Goto lbl |
||
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,3) |
show("ndeokgelw","unixdict.txt",matches,3,"k") |
||
print |
print |
||
print "Overall time taken ";timer-t;" seconds" |
print "Overall time taken ";timer-t;" seconds" |