RosettaCodeData/Task/Longest-string-challenge/Phix/longest-string-challenge-2.phix
2026-02-01 16:33:20 -08:00

12 lines
275 B
Text

function longest(integer l)
object line = gets(fn)
if line=-1 then return l end if
if l>length(line) then return longest(l) end if
l = longest(length(line))
if l=length(line) then
puts(1,line)
end if
return l
end function
{} = longest(0)