YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
|
|
@ -5,15 +5,13 @@ list$ = LOAD$("unixdict.txt")
|
|||
|
||||
FOR word$ IN list$ STEP NL$
|
||||
|
||||
SPLIT word$ BY 1 TO letter$ SIZE length
|
||||
SORT letter$ SIZE length
|
||||
JOIN letter$ BY "" TO term$ SIZE length
|
||||
term$ = EXTRACT$(SORT$(EXPLODE$(word$, 1)), " ")
|
||||
|
||||
IF word$ = term$ THEN
|
||||
IF length > MaxLen THEN
|
||||
MaxLen = length
|
||||
IF LEN(term$) > MaxLen THEN
|
||||
MaxLen = LEN(term$)
|
||||
result$ = word$
|
||||
ELIF length = MaxLen THEN
|
||||
ELIF LEN(term$) = MaxLen THEN
|
||||
result$ = APPEND$(result$, 0, word$, NL$)
|
||||
END IF
|
||||
END IF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue