14 lines
544 B
Text
14 lines
544 B
Text
procedure main(arglist)
|
|
local b # the current buffer (string)
|
|
local l # the last string
|
|
local L # a \n delimited accumulation of all the longest strings
|
|
|
|
while b := read() do {
|
|
/l := b # primes l on first pass
|
|
b ? ( move(*l), if move(1) then L := (l := b) || "\n" else if move(0) then L := (\L|"") || b || "\n")
|
|
# move(*l) - fails if b is not l characters long
|
|
# move(1) - succeeds/fails if the string is longer and triggers a reset of L
|
|
}
|
|
|
|
write(\L)
|
|
end
|