Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,38 +1,38 @@
|
|||
module Ordered_Words {
|
||||
orderword=lambda ->{
|
||||
buffer a as integer*30
|
||||
=lambda a (s as string) -> {
|
||||
if len(s)*2>len(a) then buffer a as integer*len(s)
|
||||
return a, 0:=s
|
||||
if len(s)=1 then =true: exit
|
||||
for i=1 to len(s)-1
|
||||
if a[i-1]>a[i] then break
|
||||
next i
|
||||
=true
|
||||
}
|
||||
}()
|
||||
max=2
|
||||
res=stack
|
||||
document a$
|
||||
load.doc a$, "unixdict.txt"
|
||||
k=doc.par(a$)
|
||||
i=0
|
||||
m=Paragraph(a$, 0)
|
||||
if forward(a$, m) then
|
||||
while m
|
||||
i++
|
||||
if i mod 20=1 then Print Over round(i/k*100,2);"%" : refresh
|
||||
word=paragraph$(a$, (m))
|
||||
if orderword(word) then
|
||||
if max<len(word) then max=len(word): res=stack
|
||||
if max=len(word) then stack res {data word}
|
||||
end if
|
||||
end while
|
||||
print
|
||||
end if
|
||||
open "outtxt.txt" for output as #f
|
||||
Print #f, "words:", array(res)#str$(" ")
|
||||
close #f
|
||||
win dir$+"outtxt.txt"
|
||||
orderword=lambda ->{
|
||||
buffer a as integer*30
|
||||
=lambda a (s as string) -> {
|
||||
if len(s)*2>len(a) then buffer a as integer*len(s)
|
||||
return a, 0:=s
|
||||
if len(s)=1 then =true: exit
|
||||
for i=1 to len(s)-1
|
||||
if a[i-1]>a[i] then break
|
||||
next i
|
||||
=true
|
||||
}
|
||||
}()
|
||||
max=2
|
||||
res=stack
|
||||
document a$
|
||||
load.doc a$, "unixdict.txt"
|
||||
k=doc.par(a$)
|
||||
i=0
|
||||
m=Paragraph(a$, 0)
|
||||
if forward(a$, m) then
|
||||
while m
|
||||
i++
|
||||
if i mod 20=1 then Print Over round(i/k*100,2);"%" : refresh
|
||||
word=paragraph$(a$, (m))
|
||||
if orderword(word) then
|
||||
if max<len(word) then max=len(word): res=stack
|
||||
if max=len(word) then stack res {data word}
|
||||
end if
|
||||
end while
|
||||
print
|
||||
end if
|
||||
open "outtxt.txt" for output as #f
|
||||
Print #f, "words:", array(res)#str$(" ")
|
||||
close #f
|
||||
win dir$+"outtxt.txt"
|
||||
}
|
||||
Ordered_Words
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue