RosettaCodeData/Task/Longest-string-challenge/Phix/longest-string-challenge-2.phix
2016-12-05 23:44:36 +01:00

12 lines
267 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)