Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
31
Task/Teacup-rim-text/PureBasic/teacup-rim-text.basic
Normal file
31
Task/Teacup-rim-text/PureBasic/teacup-rim-text.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
DataSection
|
||||
dname:
|
||||
Data.s "./Data/unixdict.txt"
|
||||
Data.s "./Data/wordlist.10000.txt"
|
||||
Data.s ""
|
||||
EndDataSection
|
||||
|
||||
EnableExplicit
|
||||
Dim c.s{1}(2)
|
||||
Define.s txt, bset, res, dn
|
||||
Define.i i,q, cw
|
||||
Restore dname : Read.s dn
|
||||
While OpenConsole() And ReadFile(0,dn)
|
||||
While Not Eof(0)
|
||||
cw+1
|
||||
txt=ReadString(0)
|
||||
If Len(txt)=3 : bset+txt+";" : EndIf
|
||||
Wend
|
||||
CloseFile(0)
|
||||
For i=1 To CountString(bset,";")
|
||||
PokeS(c(),StringField(bset,i,";"))
|
||||
If FindString(res,c(0)+c(1)+c(2)) : Continue : EndIf
|
||||
If c(0)=c(1) Or c(1)=c(2) Or c(0)=c(2) : Continue : EndIf
|
||||
If FindString(bset,c(1)+c(2)+c(0)) And FindString(bset,c(2)+c(0)+c(1))
|
||||
res+c(0)+c(1)+c(2)+~"\t"+c(1)+c(2)+c(0)+~"\t"+c(2)+c(0)+c(1)+~"\n"
|
||||
EndIf
|
||||
Next
|
||||
PrintN(res+Str(cw)+" words, "+Str(CountString(res,~"\n"))+" circular") : Input()
|
||||
bset="" : res="" : cw=0
|
||||
Read.s dn
|
||||
Wend
|
||||
Loading…
Add table
Add a link
Reference in a new issue